NEED HELP WITH THIS.....
#1

I need it to respawn the cars immediately after delete


COMMAND:clearcars(playerid, params[])
{
if(!IsPlayerAdmin(playerid))return SendClientMessage(playerid,COLOUR_RED,"This command is not avaliable to you!");
{
SendClientMessageToAll(COLOUR_RED,"[SYSTEM]: All cars have been deleted!");
for(new veh;veh < MAX_VEHICLES; veh++)
{
if(!IsVehicleInUse(veh)) DestroyVehicle(veh);
}
}
return 1;
}
Reply
#2

This command work fine for me!

Make sure you login as rcon :P
pawn Код:
COMMAND:clearcars(playerid, params[])
{
    if(!IsPlayerAdmin(playerid)) return SendClientMessage(playerid, COLOUR_RED, "This command is not avaliable to you!");
    {
        for(new v = 0; v < MAX_VEHICLES; v++)
        {
            if(!IsVehicleInUse(v))
            {
                SetVehicleToRespawn(v);
                SendClientMessageToAll(COLOUR_RED, "[SYSTEM]: All cars have been respawned!")
            }
        }
    }
    return 1;
}
Reply
#3

ty dude that helped as just wondering where to put it lol your awsome
Reply
#4

Put it under your other commands :P

Open PAWNO
Open your GameMode
CTRL + F
Enter "COMMAND:"
then out the command above that like this

pawn Код:
COMMAND:something(playerid, params[])
{
    //Something
    return 1;
}

COMMAND:clearcars(playerid, params[])
{
    if(!IsPlayerAdmin(playerid)) return SendClientMessage(playerid, COLOUR_RED, "This command is not avaliable to you!");
    {
        for(new v = 0; v < MAX_VEHICLES; v++)
        {
            if(!IsVehicleInUse(v))
            {
                SetVehicleToRespawn(v);
                SendClientMessageToAll(COLOUR_RED, "[SYSTEM]: All cars have been respawned!")
            }
        }
    }
    return 1;
}
You dont need to add it in a callback or something, you can actally put it whereever you want
Reply
#5

lol no dude just this part

SetVehicleToRespawn(v);
Reply
#6

hehe im not stupid lol
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)