removing the last spawned vehicle after spawning the new one
#5

Quote:
Originally Posted by Niko_boy
Посмотреть сообщение
gactually u didnt understood what i mean tthere e.e

pawn Код:
//-- top of script add under includes
new pVehicleSpawned[MAX_PLAYERS];
//------
//in onplayerconnect add this:
pVehicleSpawned[playerid] = -1;
//-------
    if(listid == vehlist)
    {
        if(response)
        {
            if( pVehicleSpawned[playerid] != -1 )
            {
                for( new i; i < MAX_PLAYERS; i++ )
                {
                      if( IsPlayerInVehicle( i,  pVehicleSpawned[playerid] ) DestroyVehicle( pVehicleSpawned[playerid] );
                }
            }
            new Float:pos[3]; GetPlayerPos(playerid, pos[0], pos[1], pos[2]);
                    pVehicleSpawned[playerid] = CreateVehicle(modelid, pos[0] + 2.5, pos[1], pos[2] + 2.5, 0.0, random(128), random(128), -1);
        }
        else
        {
            return 0;
        }
oh im a lil bit noob in scripting :P
i did it bro, it compiles successfully but when i test it in-game , it doesnt work
Reply


Messages In This Thread
removing the last spawned vehicle after spawning the new one - by absolute - 01.03.2013, 09:16
Re: removing the last spawned vehicle after spawning the new one - by Niko_boy - 01.03.2013, 09:23
Re: removing the last spawned vehicle after spawning the new one - by absolute - 01.03.2013, 09:31
Re: removing the last spawned vehicle after spawning the new one - by Niko_boy - 01.03.2013, 12:27
Re: removing the last spawned vehicle after spawning the new one - by absolute - 01.03.2013, 13:00

Forum Jump:


Users browsing this thread: 1 Guest(s)