Need little help
#1

How can i make if player Modify his/her car on next spawn(or he dissconnect) he get his modified car back
how?
Reply
#2

You'll have to store the vehicle data(https://sampwiki.blast.hk/wiki/AddVehicleComponent, and GetVehicleComponentType) in a file/database. If the player connects, spawn the vehicle and use AddVehicleComponent.
Reply
#3

ok thankz
Reply
#4

* BUMP *
i cant understand it
please can any give me script?
Reply
#5

Well its a bit long, I'll try to explain what you have to do:

Explaination:

Код:
On gamemode exit:
{
  Store all vehicle's x, y, z, rotation;
  Store all vehicle's damage;
  Store all vehicle's components;
  Store all vehicle's color;
  [...]

  Write the info to a file.
  Write the info to a file.
  Write the info to a file.
  [...]
}

On gamemode init:
{
  create the vehicle (...)
  create the vehicle (...)
  [...]

  loop("vehicleid"; from 0; to MAX_VEHICLES)
  {
    Read the file and get the saved X, Y and Z
    if((Get"vehicleid"'s  x, y, z) != 0) //So if the vehicle is valid
    { 
      Read the other info(...)
      Set the info(...)
    }
  }
}
Reply
#6

ok thankz i will try it
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)