29.11.2012, 13:27
Queria esse comando /irh para Helper n poder ir em admin 1~1341
Код:
if(strcmp(cmd, "/irh", true) == 0) { if(IsPlayerConnected(playerid)) { tmp = strtok(cmdtext, idx); if(!strlen(tmp)) { SendClientMessage(playerid, COLOR_GRAD2, "USE: /irh [id]"); return true; } new Float:plocx,Float:plocy,Float:plocz; new plo, world; plo = ReturnUser(tmp); world = GetPlayerVirtualWorld(plo); if (IsPlayerConnected(plo)) { if(plo != INVALID_PLAYER_ID) { if (PlayerInfo[playerid][pHelper] >= 1) { if(helpertrampando[playerid] < 1 && PlayerInfo[playerid][pHelper] != 1) { SendClientMessage(playerid, COLOR_GRAD1, "Vocк nгo estб trabalhando ! (/helpstatus)"); return true; } if(Spectate[playerid] != 255) { Spectate[playerid] = 256; } GetPlayerPos(plo, plocx, plocy, plocz); if(PlayerInfo[plo][pInt] > 0) { SetPlayerInterior(playerid,PlayerInfo[plo][pInt]); PlayerInfo[playerid][pInt] = PlayerInfo[plo][pInt]; PlayerInfo[playerid][pLocal] = PlayerInfo[plo][pLocal]; } if(PlayerInfo[plo][pInt] == 0) { SetPlayerInterior(playerid,0); } if(plocz > 530.0 && PlayerInfo[plo][pInt] == 0) //the highest land point in sa = 526.8 { SetPlayerInterior(playerid,1); PlayerInfo[playerid][pInt] = 1; } if (GetPlayerState(playerid) == 2) { new tmpcar = GetPlayerVehicleID(playerid); SetVehiclePos(tmpcar, plocx, plocy+4, plocz); LinkVehicleToInterior(tmpcar, 0); TelePos[playerid][0] = 0.0;TelePos[playerid][1] = 0.0; } else { SetPlayerPos(playerid,plocx,plocy+2, plocz); } SetPlayerVirtualWorld(playerid, world); SendClientMessage(playerid, 0x33FF00FF, "Vocк foi teleportado pelo Admin !"); GetPlayerName(playerid, playername, MAX_PLAYER_NAME); GetPlayerName(plo, plname, MAX_PLAYER_NAME); if(helpertrampando[playerid] == 1 && helperhide[playerid] == 1) {} else { format(string, sizeof(string), "O Helper %s Foi Atй %s.",playername,plname); } ProxDetector(30.0, playerid, string, 0x33FF00FF,0x33FF00FF,0x33FF00FF,0x33FF00FF,0x33FF00FF); } else { SendClientMessage(playerid, COLOR_GRAD1, " Vocк nгo esta autorizado a usar este comando!"); } } } else { SendClientMessage(playerid, COLOR_GRAD1, " Esse nгo й um player ativo."); } } return true; }