ertlflorian1 Posted April 26, 2013 Posted April 26, 2013 Why it dont work i every time get the output "nein" also when i hit wangcarspickup1..? local wangcarspickup1 = createPickup (-1949.04004, 273.31299, 35.187, 3, 1239, 0) --faggio local wangcarspickup2 = createPickup (-1958.81104, 300.50101, 35.187, 3, 1239, 0) --tampa local wangcarspickup3 = createPickup (-1957.479, 297.42899, 35.187, 3, 1239, 0) --huntley local wangcarscars = { [wangcarspickup1]=true, [wangcarspickup2]=true, [wangcarspickup3]=true, } function onWangCarsPickupHit (player) if (source == wangcarscars[source]) then outputChatBox ("ja") else outputChatBox ("nein") end end addEventHandler ("onPickupHit", root, onWangCarsPickupHit)
Castillo Posted April 26, 2013 Posted April 26, 2013 Is because the following 'if' statement is wrong: if (source == wangcarscars[source]) then Should be: if (wangcarscars[source]) then San Andreas Utopia RPG (SAUR) Owner & Developer. Education is the most powerful weapon which you can use to change the world.
Castillo Posted April 26, 2013 Posted April 26, 2013 You're welcome. San Andreas Utopia RPG (SAUR) Owner & Developer. Education is the most powerful weapon which you can use to change the world.
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now