pawn Код:
CreatePlayerVehicle( playerid, modelid )
{
new
Float:x,
Float:y,
Float:z,
Float:a;
GetPlayerFacingAngle(playerid, a);
GetPlayerPos(playerid, x, y, z);
if(IsPlayerInAnyVehicle(playerid) == 1)
{
GetXYInFrontOfPlayer(playerid, x, y, 8);
}
else
{
GetXYInFrontOfPlayer(playerid, x, y, 5);
}
DestroyVehicle(PlayerCar[playerid]);
PlayerCar[playerid] = CreateVehicle(modelid, x, y, z, a, -1, -1, -1);
LinkVehicleToInterior(PlayerCar[playerid], GetPlayerInterior(playerid));
PutPlayerInVehicle(playerid, PlayerCar[playerid], 0);
return 1;
}
But when I spawn a vehicle(Ex. NRG) it destroys another player's vehicle.
And if he does Ex. /v elegy it destroys my NRG and so on.