raulrobi Posted April 20, 2010 Posted April 20, 2010 addEvent("onPlayerFinish",true) addEventHandler("onPlayerFinish",getRootElement(), function (rank,finishtime) if rank == 1 then givePlayerMoney(source,350) end end ) It doesent work.I dunno whats the problem.can anyone help me?
50p Posted April 20, 2010 Posted April 20, 2010 Try to debug it. Before if add print some text (outputDebugString) and see if it appears in debug window. - MTA Script Editor - Ask your scripting questions properly, please. - 50p's public resources - Meta.xml - what is it for? How is it possible LOL
Dark Dragon Posted April 20, 2010 Posted April 20, 2010 it works perfectly, do you use it in a client side file? if so you need to put it serverside. Loads of fun for free! Also a lot of fun for free!
raulrobi Posted April 20, 2010 Author Posted April 20, 2010 as serverside.pfffffffff i used him as client side. :thankyou:
raulrobi Posted April 20, 2010 Author Posted April 20, 2010 when i want to be the first to become 350 the 2nd 100 and the 3th become 50 than 1.addEvent("onPlayerFinish",true) 2.addEventHandler("onPlayerFinish",getRootElement(), 3. function (rank,finishtime) 4. if rank == 1 then 5. givePlayerMoney(source,350) 6. if rank == 2 then 7. givePlayerMoney(source,100) 8. if rank == 3 then 9. givePlayerMoney(source,100) 10. end 11. end 12. ) it is good?
Dark Dragon Posted April 20, 2010 Posted April 20, 2010 yes this should work, but at the moment you give 100 to the 3rd place as well Loads of fun for free! Also a lot of fun for free!
DakiLLa Posted April 20, 2010 Posted April 20, 2010 addEvent("onPlayerFinish",true) addEventHandler("onPlayerFinish",getRootElement(), function (rank,finishtime) if rank == 1 then givePlayerMoney(source,350) elseif rank == 2 then givePlayerMoney(source,100) elseif rank == 3 then givePlayerMoney(source,50) end end ) And you forgot about 'elseif'
Dark Dragon Posted April 20, 2010 Posted April 20, 2010 oh didn't even see that Loads of fun for free! Also a lot of fun for free!
COOKIE2 Posted April 22, 2010 Posted April 22, 2010 (edited) doesnt work? addEvent("onPlayerFinish",true) addEventHandler("onPlayerFinish",getRootElement(), function (rank,finishtime) if rank == 1 then givePlayerMoney(source,3500) end end ) Edited April 22, 2010 by Guest
dzek (varez) Posted April 22, 2010 Posted April 22, 2010 doesnt work? I'm pretty sure that you edited the code before putting it on server. I'm SURE! Multi theft auto tools - replace cars and peds, move your map or compile your Lua files online! programista php rzeszów Need free webhosting for your small site? PM me. Need help with portforwarding? PM me. Do not PM me asking for help with scripting. Having problems with port forwarding? Send me pm, I can do whole thing for you using TeamViewer (already helped about 20 people, no worries)!
Taalasmaa Posted April 22, 2010 Posted April 22, 2010 Omg.. This COOKIE12 man is just copying every single script from every single topic and he always say "doesnt work" Cookie12, cmon learn something. http://www.wiki.multitheftauto.com http://www.sincitygaming.net - The next generation of gaming! SinCity Gaming | UltiRace 24/7 - 188.165.199.162:22003 SinCity Gaming | Roleplay Gaming - Beta soon! SinCity Gaming | Zombie Mode + - 188.165.199.162:22005 Instead of using ip: 188.165.199.162 you can use: sincitygaming.net
Taalasmaa Posted April 22, 2010 Posted April 22, 2010 nope YES. http://www.sincitygaming.net - The next generation of gaming! SinCity Gaming | UltiRace 24/7 - 188.165.199.162:22003 SinCity Gaming | Roleplay Gaming - Beta soon! SinCity Gaming | Zombie Mode + - 188.165.199.162:22005 Instead of using ip: 188.165.199.162 you can use: sincitygaming.net
Taalasmaa Posted April 22, 2010 Posted April 22, 2010 Ok, im not going to fight or post to this topic anymore. I dont want to spam this topic. But I got some proofs HERE you posted a stolen script https://forum.multitheftauto.com/viewtopic.php?f=91&t=27383 Here: this doesnt work (i open notepad and paste in it then i do save as then i type roll.lua)function roll(player,comd) local roll = math.random(1,4) if roll == 1 then outputChatBox("u won blablabla") elseif roll == 2 then outputChatBox("u lost blablabla") elseif roll == 3 then setPlayerMuted(source,true); setTimer(function() setPlayerMuted(source,false) end,1,30000) elseif roll == 4 then outputChatBox("u win blablabla") addCommandHandler("roll",roll) end end HERE: word perfect i just added it myself Here's some proofs about your "steals" And, these were first five topics what i even looked, im too lazy to get more "proof" about you. I don't want to be bad for you or something, but you just need to do something by yourself and to no copy scripts what other users made. http://www.sincitygaming.net - The next generation of gaming! SinCity Gaming | UltiRace 24/7 - 188.165.199.162:22003 SinCity Gaming | Roleplay Gaming - Beta soon! SinCity Gaming | Zombie Mode + - 188.165.199.162:22005 Instead of using ip: 188.165.199.162 you can use: sincitygaming.net
COOKIE2 Posted April 22, 2010 Posted April 22, 2010 1 that roll thing isnt stolen?? if someone post it on a site u can use it look what youre saying u must be from finland
Taalasmaa Posted April 22, 2010 Posted April 22, 2010 /voteban COOKIE12 http://www.sincitygaming.net - The next generation of gaming! SinCity Gaming | UltiRace 24/7 - 188.165.199.162:22003 SinCity Gaming | Roleplay Gaming - Beta soon! SinCity Gaming | Zombie Mode + - 188.165.199.162:22005 Instead of using ip: 188.165.199.162 you can use: sincitygaming.net
Recommended Posts