15.02.2011, 16:22
pawn Код:
if(strcmp(cmd, "/ir", true) == 0) {
tmp = strtok(cmdtext, idx);
if(!strlen(tmp)) {
SendClientMessage(playerid, laranja, "Uso correto: /ir [playerid/ParteNick]");
return 1;}
new Float:plocx,Float:plocy,Float:plocz;
new playa;
if(IsStringAName(tmp)) {
playa = GetPlayerID(tmp);
}else {
playa = strval(tmp);}
if(IsPlayerAdmin(playa)) return SendClientMessage(playerid, laranja, "Apenas Players");
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;}