[HELP] Demoliton Derby Help
#3

Quote:
Originally Posted by SuperViper
Посмотреть сообщение
I'm pretty sure vehicles don't respond instantly, set it on a timer. Also, don't use MAX_PLAYERS + 1 and MAX_ARENACARS + 1 in your loops. It starts from 0.
Now I have this...

pawn Код:
stock StartArena(arena)
{
    //set game in progress
    GameInProgress = 1;
   
    //respawn cars
    for(new i = 0; i < MAX_ARENACARS; i++)
    {
        SetVehicleToRespawn(ArenaCars[arena][i]);

        //TEST
        new test[128];
        format(test, sizeof(test), "SetVehicleToRespawn(ArenaCars[%i][%i]);", arena, i);
        SendClientMessageToAll(-1, test);
       
    }
    //put players in cars
    for(new i = 0; i < MAX_PLAYERS; i++)
    {
        PutPlayerInVehicle(i, ArenaCars[arena][i], 0);
       
        //TEST
        new test[128];
        format(test, sizeof(test), "PutPlayerInVehicle(%i, ArenaCars[%i][%i]", i, arena, i);
        SendClientMessageToAll(-1, test);
       
    }
}
pawn Код:
public OnGameModeInit()
{
    //-----------^^OTHER CODE^^------------------
   
    //---------------------------------------------------------------ARENAS
    //arena parts
    CreateObject(10394,3087.3999000,1427.6999500,22.9000000,0.0000000,0.0000000,0.0000000); //arena0
   
    //arena cars
    ArenaCars[0][1] = AddStaticVehicle(541,3108.8999000,1449.8000500,20.9000000,90.0000000,48,79); //arena_0_car1
    ArenaCars[0][2] = AddStaticVehicle(541,3066.5000000,1449.5000000,20.9000000,270.0000000,48,79); //arena_0_car2
    ArenaCars[0][3] = AddStaticVehicle(541,3066.3999000,1415.1999500,20.9000000,270.0000000,48,79); //arena_0_car3
    ArenaCars[0][4] = AddStaticVehicle(541,3109.0996100,1416.8994100,20.9000000,90.0000000,48,79); //arena_0_car4
   
    //arena barrels
    CreateObject(1225,3099.3000500,1427.0000000,20.6000000,0.0000000,0.0000000,0.0000000); //arena_0_barrel1
    CreateObject(1225,3099.1999500,1442.5000000,20.6000000,0.0000000,0.0000000,0.0000000); //arena_0_barrel2
    CreateObject(1225,3079.5000000,1427.1992200,20.6000000,0.0000000,0.0000000,0.0000000); //arena_0_barrel3
    CreateObject(1225,3078.2998000,1443.8994100,20.6000000,0.0000000,0.0000000,0.0000000); //arena_0_barrel4
    //---------------------------------------------------------------ARENAS
   
   
    return 1;
}
pawn Код:
public OnPlayerSpawn(playerid)
{
    SetTimerEx("StartArena", 5000, false, "i", 0);
    return 1;
}
The previous way, it showed the first set of "test" client messages. Example,
Код:
SetVehicleToRespawn(ArenaCars[0][0]);
SetVehicleToRespawn(ArenaCars[0][1]);
SetVehicleToRespawn(ArenaCars[0][2]);
SetVehicleToRespawn(ArenaCars[0][3]);
SetVehicleToRespawn(ArenaCars[0][4]);
SetVehicleToRespawn(ArenaCars[0][5]);
SetVehicleToRespawn(ArenaCars[0][6]);
SetVehicleToRespawn(ArenaCars[0][7]);
SetVehicleToRespawn(ArenaCars[0][8]);
SetVehicleToRespawn(ArenaCars[0][9]);
But now, nothing happens at all. The timer is set for 5 seconds. After spawning, I wait 5 seconds, and nothing happens.
Reply


Messages In This Thread
[HELP] Demoliton Derby Help - by Nathan_Taylor - 02.04.2013, 02:53
Re: [HELP] Demoliton Derby Help - by SuperViper - 02.04.2013, 03:30
Re: [HELP] Demoliton Derby Help - by Nathan_Taylor - 02.04.2013, 12:24
Re: [HELP] Demoliton Derby Help - by Nathan_Taylor - 02.04.2013, 21:05
RESOLVED - by Nathan_Taylor - 03.04.2013, 16:04

Forum Jump:


Users browsing this thread: 1 Guest(s)