13.07.2011, 20:54
pawn Код:
if(strcmp(cmd, "/ir", true) == 0)
{
if(IsPlayerConnected(playerid))
{
tmp = strtok(cmdtext, idx);
if(!strlen(tmp))
{
SendClientMessage(playerid, 0x33FF00FF, "USE: /ir [ id ]");
return 1;
}
new Float:plocx,Float:plocy,Float:plocz;
new plo;
plo = ReturnUser(tmp);
if (IsPlayerConnected(plo))
{
if(plo != INVALID_PLAYER_ID)
{
if (IsPlayerAdmin(playerid))//Troque pelo seu sistema de admin coloquei aqui logado RCON
{
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[playerid][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);
TelePos[playerid][0] = 0.0;TelePos[playerid][1] = 0.0;
}
else
{
SetPlayerPos(playerid,plocx,plocy+2, plocz);
}
SendClientMessage(playerid, 0x33FF00FF, "Voce foi teleportado pelo Admin !");
GetPlayerName(playerid, playername, MAX_PLAYER_NAME);
SetPlayerVirtualWorld(playerid, GetPlayerVirtualWorld(plo));
SetPVarInt(playerid, "Universo", GetPVarInt(plo, "Universo"));
GetPlayerName(plo, plname, MAX_PLAYER_NAME);
format(string, sizeof(string), "O Admin %s Foi Atй %s.",playername,plname);
SendClientMessage(playerid, 0x33FF00FF, string);
SendClientMessage(plo, 0x33FF00FF, string);
}
else
{
SendClientMessage(playerid, 0x33FF00FF, " Voce nгo esta autorizado a usar este comando!");
}
}
}
else
{
format(string, sizeof(string), " %d is not an active player.", plo);
SendClientMessage(playerid, 0x33FF00FF, string);
}
}
return 1;
}
if(strcmp(cmd, "/trazer", true) == 0)
{
if(IsPlayerConnected(playerid))
{
tmp = strtok(cmdtext, idx);
if(!strlen(tmp))
{
SendClientMessage(playerid, 0x33FF00FF, "USE: /trazer [ id ]");
return 1;
}
new Float:plocx,Float:plocy,Float:plocz;
new plo;
plo = ReturnUser(tmp);
if (IsPlayerConnected(plo))
{
if(plo != INVALID_PLAYER_ID)
{
/*if (PlayerInfo[plo][pAdmin] > 6)
{
SendClientMessage(playerid, 0x33FF00FF, "Trouxe o jogador atй vocк.");
return 1;
}*/ //Seria para nгo dar para puxar admin
if (IsPlayerAdmin(playerid))//Troque pelo seu sistema de admin coloquei aqui logado RCON
{
GetPlayerPos(playerid, plocx, plocy, plocz);
if(PlayerInfo[playerid][pInt] > 0)
{
SetPlayerInterior(plo,PlayerInfo[playerid][pInt]);
PlayerInfo[plo][pInt] = PlayerInfo[playerid][pInt];
PlayerInfo[plo][pLocal] = PlayerInfo[playerid][pLocal];
}
if(PlayerInfo[playerid][pInt] == 0)
{
SetPlayerInterior(plo,0);
}
if(plocz > 930.0 && PlayerInfo[playerid][pInt] == 0) //the highest land point in sa = 526.8
{
SetPlayerInterior(plo,1);
PlayerInfo[plo][pInt] = 1;
}
if (GetPlayerState(plo) == 2)
{
TelePos[plo][0] = 0.0;
TelePos[plo][1] = 0.0;
new tmpcar = GetPlayerVehicleID(plo);
SetVehiclePos(tmpcar, plocx, plocy+4, plocz);
}
else
{
SetPlayerPos(plo,plocx,plocy+2, plocz);
}
SetPlayerVirtualWorld(plo, GetPlayerVirtualWorld(playerid));
SetPVarInt(plo, "Universo", GetPVarInt(playerid, "Universo"));
SendClientMessage(plo, 0x33FF00FF, "Vocк foi teleportado pelo Admin !");
}
else
{
SendClientMessage(playerid, 0x33FF00FF, " Vocк nгo esta autorizado a usar este comando!");
}
}
}
else
{
format(string, sizeof(string), " %d Nгo й um jogador ativo.", plo);
SendClientMessage(playerid, 0x33FF00FF, string);
}
}
return 1;
}