OrbTanT Posted January 26, 2015 Posted January 26, 2015 Hello, I do not understand much of table, the truth is that this is the first time that I am trying to use a, someone could help me, as I can make it work or what the error the table. I wanted to make the function working as follows, each time, he sends for the outputChatBox, one of the cars that are in the table randomly Marker = createMarker(2471.04, 921.19, 9.5, "cylinder", 2.0, 0, 255, 0, 150) Blip = createBlip(2471.04, 921.19, 10.82, 55) vehicleIDS = {594, 606, 607, 611, 584, 608, 435, 450, 591, 539, 441, 464, 501, 465, 564, 472, 473, 493, 595, 484, 430, 453, 452, 446, 454, 581, 509, 481, 462, 521, 463, 510, 522, 461, 448, 468, 586, 425, 520} function transfender() outputChatBox("A transportadora está pedindo 50.000$ por "..getVehicleNameFromModel(math.random(#vehicleIDS)).." !", thePlayer, 255, 255, 255, false) end setTimer( transfender, 1000, 0)
DNL291 Posted January 26, 2015 Posted January 26, 2015 Marker = createMarker(2471.04, 921.19, 9.5, "cylinder", 2.0, 0, 255, 0, 150) Blip = createBlip(2471.04, 921.19, 10.82, 55) vehicleIDS = {594, 606, 607, 611, 584, 608, 435, 450, 591, 539, 441, 464, 501, 465, 564, 472, 473, 493, 595, 484, 430, 453, 452, 446, 454, 581, 509, 481, 462, 521, 463, 510, 522, 461, 448, 468, 586, 425, 520} function transfender() local randomI = math.random(#vehicleIDS) outputChatBox("A transportadora está pedindo 50.000$ por "..getVehicleNameFromModel(vehicleIDS[randomI]).." !", thePlayer, 255, 255, 255, false) end setTimer( transfender, 1000, 0) Btw, thePlayer will return nil. Please do not PM me with scripting related question nor support, use the forums instead.
xeon17 Posted January 26, 2015 Posted January 26, 2015 Write "root" instead of "thePlayer" A unique GangWar gamemode waiting for you!Click here for more information.
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