27.02.2014, 00:23
pawn Код:
if(strcmp(cmd, "/trazercarro", true) == 0)
{
if(IsPlayerConnected(playerid))
{
tmp = strtok(cmdtext, idx);
if(!strlen(tmp))
{
SendClientMessage(playerid, COLOR_GRAD2, "USE: /trazercarro [carro id]");
return 1;
}
new Float:plocx,Float:plocy,Float:plocz;
new plo;
plo = strval(tmp);
if (PlayerInfo[playerid][pAdmin] >= 4)
{
if(admtrampando[playerid] < 1 && PlayerInfo[playerid][pAdmin] != 1342 && PlayerInfo[playerid][pAdmin] != 1341)
{
SendClientMessage(playerid, COLOR_GRAD1, "Voce Nao estб trabalhando! (/trabalhar)");
return 1;
}
GetPlayerPos(playerid, plocx, plocy, plocz);
SetVehiclePos(plo,plocx,plocy+4, plocz); LinkVehicleToInterior(plo, 0);
LinkVehicleToInterior(GetPlayerVehicleID(playerid) ,GetPlayerInterior(playerid));
}
else
{
SendClientMessage(playerid, COLOR_GRAD1, " Voce Nao estб autorizado a usar este comando!");
}
}
return 1;
}