Advertisement
RogerGomesCosta

Untitled

Jul 13th, 2014
237
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C 0.69 KB | None | 0 0
  1. public OnPlayerStateChange(playerid, newstate, oldstate)
  2. {
  3.     if(oldstate == PLAYER_STATE_DRIVER && newstate == PLAYER_STATE_ONFOOT)
  4.     {
  5.         new VehicleID = GetPlayerVehicleID(playerid),
  6.             szString[200];
  7.         format(szString, sizeof szString,   "UPDATE Vehicles SET \
  8.                                             PosX = %f, \
  9.                                             PosY = %f, \
  10.                                             PosZ = %f, \
  11.                                             posA = %f \
  12.                                             WHERE ID = %d", ServerVehicles[VehicleID][VehX],
  13.                                                             ServerVehicles[VehicleID][VehY],
  14.                                                             ServerVehicles[VehicleID][VehZ],
  15.                                                             ServerVehicles[VehicleID][VehA],
  16.                                                             ServerVehicles[VehicleID][VehID]);
  17.         db_query(DataBase, szString);
  18.     }
  19.     return 1;
  20. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement