Vehicles despawn command doesn't exist? HELP!
#1

Quote:

COMMAND:carr(playerid, params[])
{
new string[128], sendername[MAX_PLAYER_NAME];
if (GetPVarInt(playerid, "PlayerLogged") == 0) return SendClientMessage(playerid, COLOR_WHITE, "You must be logged in to use this.");
if(GetPVarInt(playerid, "Admin") >= 3)
{
for(new v = 1; v <= MAX_VEHICLES; v++)
{
new bool:despawn = true;
foreach(new i : Player)
{
if(IsPlayerInAnyVehicle(i) && GetPlayerVehicleID(i) == v)
{
despawn = false;
}
}

if(despawn == true)
{
DespawnVehicle(v);
}
}
format(sendername, sizeof(sendername), "%s", PlayerInfo[playerid][pUsername]);
GiveNameSpace(sendername);
format(string, sizeof(string), "All unused cars despawned by %s.", sendername);
SendClientMessage(playerid,COLOR_WHITE,string);
}
else SendClientMessage(playerid, COLOR_ERROR, "You do not have access to this command!");
return 1;
}

So basically this command was taken from a gamemode to my own one, which uses the same base system, the problem is whenever I type this command in-game, it's just despawning my vehicles but nothing else, not giving message, not saying anything, just giving me an "unknown command" message, why like this?
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)