Respawn
#10

So basically... you created a loop, inside a loop, for the exact same thing, players...
Put this under OnGameModeInit/OnFilterScriptInit:
pawn Код:
public OnGameModeInit()
{
    SetTimer("ScheduledRespawn", time, true); //Change time to your wanted time span
    return 1;
}
Replace 'time' with the duration you want the cars to respawn in... (Example: 1 minute = 60 * 1000 = 60000)

pawn Код:
forward ScheduledRespawn();
public ScheduledRespawn()
{
    new bool:unwanted[MAX_VEHICLES];
    for(new i = 0; i < MAX_PLAYERS; i++)
    {
        if(IsPlayerInAnyVehicle(i))
        {
            unwanted[GetPlayerVehicleID(i)] = true;
        }
    }
    for(new car = 0; car < MAX_VEHICLES; car++)
    {
        if(!unwanted[car])
        {
            SetVehicleToRespawn(car);
        }
    }
    SendClientMessageToAll(COLOR_YELLOW,"• Toate masinile au fost respawnate ! •");
}
And I wouldn't be calling other people stupid when you can't make a simple car respawner for yourself. Be nice to the people who actually WANT to help you.
Reply


Messages In This Thread
Respawn - by Akcent_Voltaj - 21.01.2013, 19:29
Re: Respawn - by azzerking - 21.01.2013, 19:56
Re: Respawn - by Akcent_Voltaj - 21.01.2013, 20:22
Re: Respawn - by azzerking - 21.01.2013, 20:52
Re: Respawn - by Akcent_Voltaj - 21.01.2013, 21:17
Re: Respawn - by azzerking - 21.01.2013, 21:26
Re: Respawn - by Akcent_Voltaj - 21.01.2013, 21:58
Re: Respawn - by arakuta - 21.01.2013, 22:09
Re: Respawn - by Akcent_Voltaj - 21.01.2013, 22:41
Re: Respawn - by Threshold - 21.01.2013, 23:57

Forum Jump:


Users browsing this thread: 1 Guest(s)