16.07.2012, 18:00
Try this:
--Edit--
Oh, okay then XD
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;
}
}
}
}
Oh, okay then XD