[HELP] Fix Spawn
#6

Try this:
pawn Код:
VehicleSpawner(playerid,model)
{
    if(VehicleSpawn[playerid]==0)
    {
        new vehicleid;
        new Float:x, Float:y, Float:z, Float:a;
        GetPlayerPos(playerid, x, y, z);
        GetPlayerFacingAngle(playerid, a);
        vehicleid = CreateVehicle(model, x, y, z, a, -1, -1, -1);
        SetVehiclePos(vehicleid, x, y, z);
        SetVehicleZAngle(vehicleid, a);
        SetVehicleVirtualWorld(vehicleid, GetPlayerVirtualWorld(playerid));
        LinkVehicleToInterior(vehicleid, GetPlayerInterior(playerid));
        PutPlayerInVehicle(playerid, vehicleid, 0);
        SetVehicleHealth(vehicleid,  1000.0);
        for(new i=0;i<MAX_PLAYERVEHICLES;i++)
        {
            if(Turn[playerid] == MAX_PLAYERVEHICLES)
            {
                VehicleDeleter(PlayerVehicle[playerid][0]);
                new b = MAX_PLAYERVEHICLES - 1;
                for(new c=0; c<b; c++)
                {
                    new Aa=c+1;
                    PlayerVehicle[playerid][c]=PlayerVehicle[playerid][Aa];
                }
                PlayerVehicle[playerid][b] = 0;
                Turn[playerid]--;
            }
            if(!PlayerVehicle[playerid][i])
            {
                PlayerVehicle[playerid][i] = vehicleid;
                Turn[playerid]++;
                break;
            }
        }
    }
}
--Edit--
Oh, okay then XD
Reply


Messages In This Thread
[HELP] Fix Spawn - by kbalor - 16.07.2012, 17:11
Re: [HELP] Fix Spawn - by Andi_Evandy - 16.07.2012, 17:22
Re: [HELP] Fix Spawn - by kbalor - 16.07.2012, 17:37
Re: [HELP] Fix Spawn - by Andi_Evandy - 16.07.2012, 17:48
Re: [HELP] Fix Spawn - by kbalor - 16.07.2012, 17:54
Re: [HELP] Fix Spawn - by Andi_Evandy - 16.07.2012, 18:00
Re: [HELP] Fix Spawn - by kbalor - 16.07.2012, 18:09
Re: [HELP] Fix Spawn - by kbalor - 16.07.2012, 19:23
Re: [HELP] Fix Spawn - by Andi_Evandy - 17.07.2012, 08:30
Re: [HELP] Fix Spawn - by kbalor - 17.07.2012, 11:51

Forum Jump:


Users browsing this thread: 2 Guest(s)