30.11.2013, 17:12
im having trouble with these commands. Can someone please tell me where i've went wrong? I'll +rep you if you can resolve the problem!
pawn Код:
command(respawnvehicles, playerid, params[]) // Respawns EVERY unused vehicle.
{
if(Player[playerid][AdminLevel] >= 2)
{
for(new i = 1; i < MAX_VEHICLES; i++)
{
if(!IsVehicleOccupied(i))
{
SetVehicleToRespawn(i);
}
}
}
else return SendClientMessage(playerid, GREY, "You are not a high enough administrator rank to use this command.");
return 1;
}
command(frespawnvehicles, playerid, params[]) // Respawns EVERY unused faction vehicle
{
if(Player[playerid][Faction] != 0)
{
if(Player[playerid][FactionRank] >= 6)
{
for(new i = 1; i < MAX_VEHICLES; i++)
{
if(!IsVehicleOccupied(i))
{
SetVehicleToRespawn(VehicleFaction[i]);
}
}
}
else return SendClientMessage(playerid, GREY, "You are not a high enough rank in your faction to use this command.");
}
else return SendClientMessage(playerid, GREY, "You are not in a faction.");
return 1;
}