Remove unoccupied Cars
#1

This is the code i use and when i do /deletevehicles its not deleting the cars

HELP ME FIX IT PLEASE :P

Код:
CMD:deletecars(playerid, params[])
{
	if(PlayerInfo[playerid][AdminLevel] >= 1)
	{
	    for(new v=0;v<MAX_VEHICLES;v++) if(!VehicleOccupied(v)) EraseVeh(v);
		SendClientMessage(playerid, COLOR_GREY, "All Unoccipied Vehicles Deleted!");
	}
	else return SendClientMessage(playerid, COLOR_RED, "ERROR: you need to be atleast Admin Level 1 to use this command");
	return 1;
}
forward EraseVeh(vehicleid);
public EraseVeh(vehicleid)
{
    for(new i=0;i<MAX_PLAYERS;i++)
	{
        new Float:X,Float:Y,Float:Z;
    	if(IsPlayerInAnyVehicle(i))
		{
  		RemovePlayerFromVehicle(i);
  		GetPlayerPos(i,X,Y,Z);
 		SetPlayerPos(i,X,Y+3,Z);
	    }
	    SetVehicleParamsForPlayer(vehicleid,i,0,1);
	}
    SetTimerEx("VehRes",1500,0,"i",vehicleid);
}
and i meant if you can create me one , thanks
Reply


Messages In This Thread
Remove unoccupied Cars - by DarknessKnight - 11.06.2014, 16:20
Re: Remove unoccupied Cars - by Rittik - 11.06.2014, 16:32
Re: Remove unoccupied Cars - by DarknessKnight - 11.06.2014, 16:36
Re: Remove unoccupied Cars - by DarknessKnight - 11.06.2014, 16:47
Re: Remove unoccupied Cars - by xGamerFx - 11.06.2014, 17:25
Re: Remove unoccupied Cars - by DarknessKnight - 11.06.2014, 17:41
Re: Remove unoccupied Cars - by xGamerFx - 11.06.2014, 17:47

Forum Jump:


Users browsing this thread: 1 Guest(s)