Jump to content

who know more for upg


daKillar2000

Recommended Posts

Heey i maked a automatic vehicleupgradesaver but do u know more addenevthandler?

i have this addevent,

addEventHandler ( "onResourceStop", getRootElement(getThisResource()), saveStuff) 
addEventHandler ( "onPreResourceStart", getRootElement(getThisResource()), saveStuff) 
addEventHandler ( "onPlayerLogout", getRootElement(getThisResource()), saveStuff) 
addEventHandler ( "onPlayerQuit", getRootElement(getThisResource()), saveStuff) 
addEventHandler ( "onVehicleExplode", getRootElement(getThisResource()), saveStuff) 

Link to comment

check

this for car 1:

for i,v1 in ipairs (getElementsByType ("player")) do

this for car2:

for i,v2 in ipairs (getElementsByType ("player")) do

this for car3:

for i,v3 in ipairs (getElementsByType ("player")) do

this for car4:

for i,v4 in ipairs (getElementsByType ("player")) do

the problem is when i upgrade car1 then he do the upgrades too on car2 car3 and car4,

how fix it ? :mrgreen:

Link to comment
check

this for car 1:

for i,v1 in ipairs (getElementsByType ("player")) do

this for car2:

for i,v2 in ipairs (getElementsByType ("player")) do

this for car3:

for i,v3 in ipairs (getElementsByType ("player")) do

this for car4:

for i,v4 in ipairs (getElementsByType ("player")) do

the problem is when i upgrade car1 then he do the upgrades too on car2 car3 and car4,

how fix it ? :mrgreen:

i have getElemtByType by player if i change it to vehicl1 vehicle2 etc... then not works:(

Link to comment

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...