19.03.2011, 21:35
pawn Код:
if(strcmp(cmd, "/respawnorg", true) == 0)
{
if (PlayerInfo[playerid][pAdmin] >= 1)
{
if(admtrampando[playerid] < 1)
{
SendClientMessage(playerid, COLOR_GREY, " Vocк nao estб em modo adm!!");
return 1;
}
new x_nr[256];
new carid = strval(tmp);
x_nr = strtok(cmdtext, idx);
if(!strlen(x_nr)) {
SendClientMessage(playerid, COLOR_WHITE, "USE: /respawnorg [ orgid ]");
SendClientMessage(playerid, COLOR_WHITE, "Id validos : /np.");
return 1;
}
if(strcmp(x_nr,"1",true) == 0)
{
giveplayerid = ReturnUser(tmp);
tmp = strtok(cmdtext, idx);
if(IsPlayerConnected(giveplayerid))
{
if(IsAPmCar(carid) != INVALID_VEHICLE_ID)
{
SetVehicleToRespawn(IsAPmCar(carid));
return 1;
}
}
else
{
SendClientMessage(playerid, COLOR_GREY, " ID invalido !");
return 1;
}
}
if(strcmp(x_nr,"2",true) == 0)
{
giveplayerid = ReturnUser(tmp);
tmp = strtok(cmdtext, idx);
if(IsPlayerConnected(giveplayerid))
{
if(IsABOPECar(carid) != INVALID_VEHICLE_ID)
{
SetVehicleToRespawn(IsABOPECar(carid));
return 1;
}
}
else
{
SendClientMessage(playerid, COLOR_GREY, " ID invalido !");
return 1;
}
}
if(strcmp(x_nr,"3",true) == 0)
{
giveplayerid = ReturnUser(tmp);
tmp = strtok(cmdtext, idx);
if(IsPlayerConnected(giveplayerid))
{
if(IsAExCar(carid) != INVALID_VEHICLE_ID)
{
SetVehicleToRespawn(IsAExCar(carid));
return 1;
}
}
else
{
SendClientMessage(playerid, COLOR_GREY, " ID invalido !");
return 1;
}
}
}
else
{
SendClientMessage(playerid, COLOR_GREY, " Vocк nгo й ADM !");
}
return 1;
}