13.07.2009, 14:37
Try that, not sure if it works.
It might also just be that your DynamicVehicles faction vehicles array is not properly working.
It might also just be that your DynamicVehicles faction vehicles array is not properly working.
pawn Код:
if(strcmp(cmd, "/respawnf", true) == 0)
{
if (PlayerInfo[playerid][pRank] == 1 && PlayerInfo[playerid][pFaction] != 255)
{
for(new i=0;i<MAX_VEHICLES;i++)
{
if(IsVehicleOccupied(i) == 0)
{
if(PlayerInfo[playerid][pFaction] == DynamicCars[i][FactionCar])
{
SetVehicleToRespawn(i);
}
}
}
format(string, sizeof(string), "%s has just respawned faction vehicles.", GetPlayerNameEx(playerid));
SendFactionMessage(PlayerInfo[playerid][pFaction], COLOR_LIGHTRED, string);
return 1;
}
else return SendClientMessage(playerid, COLOR_LIGHTYELLOW2, "[ERROR:] You are not a leader!");
}