Delete empty cars [1 sec help please] [+REP]
#1

Can U Make this command to delete Empty Cars Only please?
+REP FOR HELPER

pawn Код:
COMMAND:deletecars(playerid, params[])
{
    if (playerid == -1) SendClientMessageToAll(0xFFFFFFFF, "Cars Removed");

    {
    for( new veh; veh < MAX_VEHICLES; veh ++ )
    {
        DestroyVehicle( veh );
    }
    return 1;
 }
}
Reply
#2

They've solved this problem in this thread: https://sampforum.blast.hk/showthread.php?tid=170947

Hope it works!
Reply
#3

You'll need the math plugin. Get it from here: https://sampforum.blast.hk/showthread.php?tid=270508.

pawn Код:
COMMAND:deletecars(playerid, params[])
{
    for(new i = 1; i < MAX_VEHICLES; i ++)
        if(MPGetVehicleDriverCount(i) == 0) DestroyVehicle(i);
    return 1;
}
Reply
#4

Show you error boards.
Reply
#5

Quote:
Originally Posted by SickAttack
Посмотреть сообщение
You'll need the math plugin. Get it from here: https://sampforum.blast.hk/showthread.php?tid=270508.

pawn Код:
COMMAND:deletecars(playerid, params[])
{
    for(new i = 1; i < MAX_VEHICLES; i ++)
        if(MPGetVehicleDriverCount(i) == 0) DestroyVehicle(i);
    return 1;
}
Thanks
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)