15.02.2011, 16:20
pawn Код:
if(strcmp(cmd, "/ir", true) == 0)
{
tmp = strtok(cmdtext, idx);
if(!strlen(tmp))
{
SendClientMessage(playerid, laranja, "Uso correto: /ir [playerid/ParteNick]");
return 1;
}
if(PlayerInfo[giveplayerid][pAdmin] >= 1 || IsPlayerAdmin(giveplayerid))
{
SendClientMessage(playerid, Cor, "Nгo podes se teleportar a um administrador");
return 1;
}
new Float:plocx,Float:plocy,Float:plocz;
new playa;
if(IsStringAName(tmp))
{
playa = GetPlayerID(tmp);
}
else
{
playa = strval(tmp);
}
GetPlayerPos(playa, plocx, plocy, plocz);
new intid = GetPlayerInterior(playa);
SetPlayerInterior(playerid,intid);
if (GetPlayerState(playerid) == 2)
{
new tmpcar = GetPlayerVehicleID(playerid);
SetVehiclePos(tmpcar, plocx, plocy+4, plocz);
}
else
{
SetPlayerPos(playerid,plocx,plocy+2, plocz);
}
return 1;
}
Tenta ai...