pawn Код:
if(strcmp(cmd, "/ir", true) == 0)
{
if(IsPlayerConnected(playerid))
{
tmp = strtok(cmdtext, idx);
if(!strlen(tmp))
{
SendClientMessage(playerid, COLOR_GRAD2, "USO: /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 (PlayerInfo[playerid][pVipLevel] >= 1)
{
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)
{
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);
}
GetPlayerName(plo, giveplayer,256);
GetPlayerName(playerid, sendername,256);
format(string, sizeof(string), "[Info] Vocк teleportou atй %s.", giveplayer);
SendClientMessage(playerid, COLOR_WHITE, string);
format(string, sizeof(string), "[Info] O VIP %s, teleportou atй vocк.", sendername);
SendClientMessage(plo, COLOR_WHITE, string);
}
else
{
SendClientMessage(playerid, COLOR_GRAD1, " Vocк nгo estб autorizado a usar este comando");
}
}
}
else
{
format(string, sizeof(string), " %d nгo й um player ativo.", plo);
SendClientMessage(playerid, COLOR_GRAD1, string);
}
}
return 1;
}
Nгo te garanto nada shaushaushaus comecei a scriptar a 7 dias entao n sei c vai fumegar e n testei