public OnPlayerStateChange(playerid, newstate, oldstate){ if(newstate == PLAYER_STATE_DRIVER || newstate == PLAYER_STATE_PASSENGER) { // IDE MAJD KÉSŐBB JÖN CUCC }
if(oldstate == PLAYER_STATE_DRIVER || oldstate == PLAYER_STATE_PASSENGER)
#include <a_samp>#include <SII>enum cInfo{ cModel, Float:cLocationx, Float:cLocationy, Float:cLocationz, Float:cAngle, cColorOne, cColorTwo, cRendszam[MAX_PLAYER_NAME], cKerek, cPaintjob, cKinezet1, cKinezet2, cKinezet3, cKinezet4, cKinezet5, cKinezet6, cKinezet7, cKinezet8, cKinezet9, cKinezet10, cNitro, cHidraulika,};new CarInfo[MAX_VEHICLES][cInfo];public OnPlayerStateChange(playerid, newstate, oldstate){if(oldstate == PLAYER_STATE_DRIVER || oldstate == PLAYER_STATE_PASSENGER){new Float:x,Float:y,Float:z; new Float:a; new carid; carid = GetPlayerVehicleID(playerid); GetVehiclePos(carid, x, y, z); GetPlayerFacingAngle(playerid, a); GetVehicleZAngle(carid, a); CarInfo[carid][cLocationx] = x; CarInfo[carid][cLocationy] = y; CarInfo[carid][cLocationz] = z; CarInfo[carid][cAngle] = a; SaveCarCoords();return 1;}return 0;}stock SaveCarCoords(){ for(new idx = 200; idx < sizeof(CarInfo); idx++) { new iStr[30]; format(iStr, sizeof(iStr), \"autok/%d.ini\", idx); if(INI_Open(iStr)) { INI_WriteInt(\"Model\", CarInfo[idx][cModel]); INI_WriteFloat(\"Locationx\", CarInfo[idx][cLocationx]); INI_WriteFloat(\"Locationy\", CarInfo[idx][cLocationy]); INI_WriteFloat(\"Locationz\", CarInfo[idx][cLocationz]); INI_WriteFloat(\"Angle\", CarInfo[idx][cAngle]); INI_WriteInt(\"ColorOne\", CarInfo[idx][cColorOne]); INI_WriteInt(\"ColorTwo\", CarInfo[idx][cColorTwo]); INI_WriteString(\"Rendszam\", CarInfo[idx][cRendszam]); INI_WriteInt(\"Kerek\", CarInfo[idx][cKerek]); INI_WriteInt(\"Paintjob\", CarInfo[idx][cPaintjob]); INI_WriteInt(\"Kinezet1\", CarInfo[idx][cKinezet1]); INI_WriteInt(\"Kinezet2\", CarInfo[idx][cKinezet2]); INI_WriteInt(\"Kinezet3\", CarInfo[idx][cKinezet3]); INI_WriteInt(\"Kinezet4\", CarInfo[idx][cKinezet4]); INI_WriteInt(\"Kinezet5\", CarInfo[idx][cKinezet5]); INI_WriteInt(\"Kinezet6\", CarInfo[idx][cKinezet6]); INI_WriteInt(\"Kinezet7\", CarInfo[idx][cKinezet7]); INI_WriteInt(\"Kinezet8\", CarInfo[idx][cKinezet8]); INI_WriteInt(\"Kinezet9\", CarInfo[idx][cKinezet9]); INI_WriteInt(\"Kinezet10\", CarInfo[idx][cKinezet10]); INI_WriteInt(\"Nitro\", CarInfo[idx][cNitro]); INI_WriteInt(\"Hidraulika\", CarInfo[idx][cHidraulika]); INI_Save(); INI_Close(); } } return 1;}