11.09.2015, 21:29
Hello everybody, I made special weapon for my server, called shield, it`s DFT with attached objects, but problem is when player exit vehicle, player`s position changed too far from the truck, maybe it`s becouse of attached objects. So I found the way how to fix it, but problem is in that, that my fix doesn`t work. Here is the code, I don`t see anything wrong. Please check it 

pawn Код:
if(oldstate == PLAYER_STATE_DRIVER && newstate == PLAYER_STATE_ONFOOT)
{
new Float:X, Float:Y, Float:Z;
if(IsPlayerInVehicle(playerid, vehicleid1))
{
GetVehiclePos(vehicleid1, X, Y, Z);
SetPlayerPos(playerid, X, Y+5, Z);
}
else if(IsPlayerInVehicle(playerid, vehicleid2))
{
GetVehiclePos(vehicleid2, X, Y, Z);
SetPlayerPos(playerid, X, Y+5, Z);
}
}

