07.04.2009, 12:28
Hello. I am a very logical person and an experienced scripter, but I am having a problem with one thing. I am not very skilled or logical when it comes to appending and reading data from files.
Here is the format I would like to use for the cars:
the owner field would be a name, such as Kyle_Smith or Damian_Oden
posX, posY, posZ, rotation; we all know these
alarm is a numeric value - either 0, 1 or 2
What I would like to do is make it so that when someone uses a command and it spawns the car using CreateVehicle, I would like it to write this to a file named PlayerCars.cfg, mind you, with the alarm variable at 0. I would also like to make a /park command which lets the player place their vehicle anywhere they want. When they do /park, I would like it to get the car's position and write it to posX|posY|posZ|rotation. Can anyone provide me these snippets?
Here is the format I would like to use for the cars:
Code:
owner|posX|posY|posZ|rotation|alarm
posX, posY, posZ, rotation; we all know these
alarm is a numeric value - either 0, 1 or 2
What I would like to do is make it so that when someone uses a command and it spawns the car using CreateVehicle, I would like it to write this to a file named PlayerCars.cfg, mind you, with the alarm variable at 0. I would also like to make a /park command which lets the player place their vehicle anywhere they want. When they do /park, I would like it to get the car's position and write it to posX|posY|posZ|rotation. Can anyone provide me these snippets?