Quote:
Originally Posted by mati233
I dont know how to store information or load it from files, so I'll just tell give you some tips.
You just need to get the position of the vehicle and save it on the file, you can get the position by adding for example onplayerupdate:
PHP код:
if(GetPlayerState(playerid) == PLAYER_STATE_DRIVER){
new vid=GetPlayerVehicleID(playerid);
new Float:vX, Float:vY, Float:vZ, Float:vA;
GetVehiclePos(vid, vX, vY, vZ);
GetVehicleZAngle(vid, vA);
// code to store the info on the file here
}
I dont know if you already have a file where you store the vehicle information, if you have, you can just make it update the coords, and when restart it will load the new ones automaticly, but if you don't explain better the situation and I hope I can help you.
|
i know how to get the pos and angle
i just wan't to store the code into the file