car respawn command doesn't working?
#1

PHP Code:
COMMAND:rac(playeridparams[])
{
    new 
string[128], sendername[MAX_PLAYER_NAME];
    if (
GetPVarInt(playerid"PlayerLogged") == 0) return SendClientMessage(playeridCOLOR_WHITE"You must be logged in to use this.");
    if(
GetPVarInt(playerid"Admin") >= 3)
    {
           for(new 
1<= MAX_VEHICLESv++)
        {
            new 
bool:despawn true;
            foreach(new 
Player)
             {
                 if(
IsPlayerInAnyVehicle(i) && GetPlayerVehicleID(i) == v)
                 {
                     
despawn false;
                 }
             }
            if(
despawn == true)
            {
                
DespawnVehicle(v);
            }
        }
        
format(sendernamesizeof(sendername), "%s"PlayerInfo[playerid][pUsername]);
          
GiveNameSpace(sendername);
        
format(stringsizeof(string), "All unused cars despawned by %s."sendername);
        
SendClientMessage(playerid,COLOR_WHITE,string);
    }
    else 
SendClientMessage(playeridCOLOR_ERROR"You do not have access to this command!");
    return 
1
Well it does despawn, but actually doesn't even announce to people and shows "wrong command" as I did already and tried to fix it out but.. eh? can anyone help me out please?
Reply


Messages In This Thread
car respawn command doesn't working? - by DemME - 06.06.2017, 00:16
Re: car respawn command doesn't working? - by NewFreeroamStunt - 06.06.2017, 04:44
Re: car respawn command doesn't working? - by JasonRiggs - 06.06.2017, 12:13
Re: car respawn command doesn't working? - by Jefff - 06.06.2017, 13:31

Forum Jump:


Users browsing this thread: 1 Guest(s)