07.06.2014, 08:08
hi all...
i have a little bit bug here... i want to make a vehicle spawner, and when i test it alone, it's work fine.
but when i try it with some of my friends, it's got bugged. What i want is destroy previouse player's spawned vehicle. but it's destroy my friend's vehicle can somebody help me?
i have a little bit bug here... i want to make a vehicle spawner, and when i test it alone, it's work fine.
but when i try it with some of my friends, it's got bugged. What i want is destroy previouse player's spawned vehicle. but it's destroy my friend's vehicle can somebody help me?
pawn Code:
//
if(IsPlayerInAnyVehicle(playerid))
{
new vid = GetPlayerVehicleID(playerid);
DestroyVehicle(vid);
if(VehicleSpawn[playerid]==0)
{
new Float:x,Float:y,Float:z,Float:a;
GetPlayerPos(playerid,x,y,z);
GetPlayerFacingAngle(playerid,a);
DestroyVehicle(pInfo[playerid][pSpawnVehicle]);
pInfo[playerid][pSpawnVehicle] = AddStaticVehicle(model, x, y, z+1, a, -1, -1);
PutPlayerInVehicle(playerid, pInfo[playerid][pSpawnVehicle], 0);
SetVehicleHealth(pInfo[playerid][pSpawnVehicle], 1000.0);
LinkVehicleToInterior(pInfo[playerid][pSpawnVehicle], GetPlayerInterior(playerid));
}
}