02.12.2011, 16:45
hi all, today I have made a simple include, with this function can set the player position when the player is in the car.
this is the script:
DOWNLOAD:
http://solidfiles.com/d/6fd244e65c/
Код:
SetPlayerPositionWithVehicle(playerid, x, y, z);
Код:
#include <a_samp> SetPlayerPosWithVehicle(playerid, Float:X, Float:Y, Float:Z) { SetPlayerPosEx(playerid,X,Y,Z); if(GetPlayerState(playerid) == PLAYER_STATE_DRIVER) { SetVehiclePos(GetPlayerVehicleID(playerid),X,Y,Z); LinkVehicleToInterior(GetPlayerVehicleID(playerid),0); PutPlayerInVehicle(playerid,GetPlayerVehicleID(playerid),0); SetVehicleZAngle(GetPlayerVehicleID(playerid),0.0); } } SetPlayerPosEx(playerid, Float:X, Float:Y, Float:Z) { SetPlayerPos(playerid,X,Y,Z); SetPlayerInterior(playerid,0); SetPlayerWorldBounds(playerid, 99999.0, -99999.0, 99999.0, -99999.0); }
http://solidfiles.com/d/6fd244e65c/