11.06.2016, 07:56
here is what i am trying to do, i have a dynamic car parking system, i trying that if i doing the command /park the car will park, it works but if i want to update the exact position of the exact car it duplicate the car i want that if the vehicle will not found in the exact position it will create a new one and if the car will found in the exact position it will update the position x y z in file i have the command here :
plis help i appreciate it :}
Quote:
if(strcmp(cmdtext, "/park", true) == 0) { new modelid = GetVehicleModel(GetPlayerVehicleID(playerid)); if(GetPlayerState(playerid) != PLAYER_STATE_DRIVER) return SendClientMessage(playerid,0xFF0000FF,"ERROR: You are not driving a vehicle"); GetVehiclePos(GetPlayerVehicleID(playerid),XX,YY,Z Z); GetVehicleZAngle(GetPlayerVehicleID(playerid),AA); SetVehiclePos(GetPlayerVehicleID(playerid),XX,YY,Z Z); getdate(byear,bmonth,bday); GetVehicleColor(GetPlayerVehicleID(playerid),ppcol 1,ppcol2); format(strr,sizeof(strr),"You have added this vehicle to the cars.ini (model %d,Color 1 %d,Color 2 %d)",GetVehicleModel(GetPlayerVehicleID(playerid)) ,ppcol1,ppcol2); SendClientMessage(playerid,0xFF9900AA,strr); new File ![]() format(strr,sizeof(strr),"%d,%f,%f,%f,%f,%d,%d,360 0); //%s(%s %d)",modelid,XX,YY,ZZ,AA,ppcol1,ppcol2); fwrite(pos, strr); fclose(pos); return 1; } |