14.05.2014, 19:13
I tried to make an command, when leader type /lcr to respawn the cars faction.
I put this line "IsAlcnCar", but he respawn all cars on server.
pawn Код:
if(strcmp(cmd, "/lcncarrespawn", true) == 0 || strcmp(cmd, "/lcr", true) == 0)
{
if (PlayerInfo[playerid][pLeader] == 5 || PlayerInfo[playerid][pRank] == 6)
{
new tmpcar = GetPlayerVehicleID(playerid);
if(IsAlcnCar(tmpcar))
{
for(new player=0; player<MAX_PLAYERS; player++)
{
if(!IsVehicleOccupied(player)) SetVehicleToRespawn(player);
}
}
}
return 1;
}