13.07.2009, 21:07
I made it workable now, but there is another problem. Current script is this:
It respawns right vehicles and also show up the message, but behind everything it displays 'SERVER: Unknown Command'.
What could be the solution to fix?
pawn Код:
if(strcmp(cmd, "/respawnf", true) == 0)
{
if (PlayerInfo[playerid][pRank] == 1 && PlayerInfo[playerid][pFaction] != 255)
{
format(string, sizeof(string), "%s has just respawned faction vehicles.", GetPlayerNameEx(playerid));
SendFactionMessage(PlayerInfo[playerid][pFaction], COLOR_LIGHTRED, string);
for(new i=0;i<MAX_VEHICLES;i++)
{
if(DynamicCars[i][FactionCar] != 255)
{
if(DynamicCars[i][FactionCar] == PlayerInfo[playerid][pFaction])
{
if(IsVehicleOccupied(i+1) == 0)
{
SetVehicleToRespawn(i+1);
}
}
}
}
}
else
{
SendClientMessage(playerid, COLOR_LIGHTYELLOW2, "[ERROR:] You are not a leader!");
}
return 1;
}
What could be the solution to fix?