Car Respawn Command
#1

Hi,

I want to make a car respawn command and dont know how to respawn all my cars on the server.
The rest of the command is complete... I only need to reset all cars to their spawn if i type the command:

pawn Код:
CMD:respawn(playerid, params[])
{
    if (IsPlayerAdmin(playerid) == 1)
    {
        new command[64];
       
        if (sscanf(params, "s", command)) return SendClientMessage(playerid, RED, "USAGE: /respawn [befehl]");
       
        else if (!strcmp(command, "autos", true))
        {
            SendClientMessageToAll(ORANGE, "*** Autos wurden respawnt");
        }
           
        SendClientMessage(playerid, RED, "SERVER: Befehl ist noch in Arbeit");
    }
    else
    {
        SendClientMessage(playerid, RED, "SERVER: Du bist nicht als Admin eingeloggt");
    }
    return 1;
}
Thanks for help
Reply
#2

Add that
pawn Код:
for(new cars=0; cars<MAX_VEHICLES; cars++)
{          
SetVehicleToRespawn(cars);
Reply
#3

Thanks.

Reply


Forum Jump:


Users browsing this thread: 3 Guest(s)