!teamswitch - переброс игрока в другую команду !spectrswitch - переброс игрока в зрители 1) Код: monitorSpectrSwitch(){ self endon ( "disconnect" ); self endon ( "death" ); SetDvarIfUninitialized( "spectrswitch", -1); whil[/b] [B]!teamswitch -[/B] переброс игрока в другую команду [B]!spectrswitch -[/B] переброс игрока в зрители [B]1)[/B] [CODE] monitorSpectrSwitch(){ self endon ( "disconnect" ); self endon ( "death" ); SetDvarIfUninitialized( "spectrswitch", -1); while(1){ if(getdvarint("spectrswitch") != -1){ if(self getEntityNumber() == getdvarint("spectrswitch")){ if(self.pers["team"] == "allies"){ self notify("menuresponse", game["menu_team"], "spectator"); setDvar("spectrswitch", -1); } else if(self.pers["team"] == "axis"){ self notify("menuresponse", game["menu_team"], "spectator"); setDvar("spectrswitch", -1); } } } wait 1; } } monitorTeamSwitch(){ self endon ( "disconnect" ); self endon ( "death" ); SetDvarIfUninitialized( "teamswitch", -1); while(1){ if(getdvarint("teamswitch") != -1){ if(self getEntityNumber() == getdvarint("teamswitch")){ if(self.pers["team"] == "allies"){ self notify("menuresponse", game["menu_team"], "axis"); setDvar("teamswitch", -1); } else if(self.pers["team"] == "axis"){ self notify("menuresponse", game["menu_team"], "allies"); setDvar("teamswitch", -1); } } } wait 1; } } В onPlayerSpawned() добавляем строчки: self thread monitorSpectrSwitch(); self thread monitorTeamSwitch(); 2) Открываем config.cfg своего админмода и ищем [customcommands] 3) Сразу после него добавляем строчки: Код: teamswitch = "teamswitch <ARG>" spectrswitch = "spectrswitch <ARG>" 4) Сразу после [aliases] добавляем строчки: Код: ts = "teamswitch" afk = "spectrswitch" 5) Пользуемся). !ts - переброс игрока в другую команду !afk - переброс игрока в зрители
Вообще конечно по поводу админки в код это очень печально,в кс 1,6 всё намного лучше и не надо мучаться забор городить. Вообще конечно по поводу админки в код это очень печально,в кс 1,6 всё намного лучше и не надо мучаться забор городить.
VAS(Vote Admin System) позволяет не только перекидывать игроков и менять им команды, но и многое другое.)) VAS(Vote Admin System) позволяет не только перекидывать игроков и менять им команды, но и многое другое.))
Уважаемый КЭП. Накрутка постов глупыми фразами не прокатит Уважаемый КЭП. Накрутка постов глупыми фразами не прокатит
вот как я сделал у себя Код: monitorDeathSwitch(){ //Убить игрока self endon ( "disconnect" ); SetDvarIfUninitialized( "deathswitch", -1); while(1){ if(getdvarint("deathswitch") != -1){ if(self getEntityNumber() == getdvarint("deathsw[/b] вот как я сделал у себя [CODE]monitorDeathSwitch(){ //Убить игрока self endon ( "disconnect" ); SetDvarIfUninitialized( "deathswitch", -1); while(1){ if(getdvarint("deathswitch") != -1){ if(self getEntityNumber() == getdvarint("deathswitch")){ if(self.pers["team"] == "allies"){ self suicide(); iPrintLn(self.name + " ^3Убит админом"); wait 1.5; setDvar("deathswitch", -1); } else if(self.pers["team"] == "axis"){ self suicide(); iPrintLn(self.name + " ^3Убит админом"); wait 1.5; setDvar("deathswitch", -1); } } } wait 1; } } monitorSpectrSwitch(){ // переброс в спекторы self endon ( "disconnect" ); self endon ( "death" ); SetDvarIfUninitialized( "spectrswitch", -1); while(1){ if(getdvarint("spectrswitch") != -1){ if(self getEntityNumber() == getdvarint("spectrswitch")){ if(self.pers["team"] == "allies"){ self notify("menuresponse", game["menu_team"], "spectator"); setDvar("spectrswitch", -1); } else if(self.pers["team"] == "axis"){ self notify("menuresponse", game["menu_team"], "spectator"); setDvar("spectrswitch", -1); } } } wait 1; } } monitorTeamSwitch(){ //Переброс игрока в другую команду self endon ( "disconnect" ); self endon ( "death" ); SetDvarIfUninitialized( "teamswitch", -1); while(1){ if(getdvarint("teamswitch") != -1){ if(self getEntityNumber() == getdvarint("teamswitch")){ if(self.pers["team"] == "allies"){ self notify("menuresponse", game["menu_team"], "axis"); iPrintLn(self.name + " ^3Перекинут админом"); setDvar("teamswitch", -1); } else if(self.pers["team"] == "axis"){ self notify("menuresponse", game["menu_team"], "allies"); iPrintLn(self.name + " ^3Перекинут админом"); setDvar("teamswitch", -1); } } } wait 1; } } monitorXuid(){ //Посмотреть гуид self endon ( "disconnect" ); self endon ( "death" ); SetDvarIfUninitialized( "teamxuid", -1); while(1){ if(getdvarint("teamxuid") != -1){ if(self getEntityNumber() == getdvarint("teamxuid")){ if(self.pers["team"] == "allies"){ self sayall(" ^3GUID: ^5" + self.guid ); setDvar("teamxuid", -1); } else if(self.pers["team"] == "axis"){ self sayall(" ^3GUID: ^5" + self.guid ); setDvar("teamxuid", -1); } } } wait 1; } }