Jump to content

bartje01

Members
  • Posts

    208
  • Joined

  • Last visited

Everything posted by bartje01

  1. OMFGOMFGOMFG I WORKS YAHIOOOOOO PRORACER AWEEESOOME (L) THANKYOU BOTH BOTH OF YOU. AWWEEESOME HEROES!!!!!! TYTY
  2. Alright np. Take your time
  3. Errors gone but still no saving Dammiiieeet Not so easy I guess Your code looks really hard. The step from sa-mp to MTA is so hard for me
  4. WHere is the easy part of that Didn't worked btw:( In my console no errors or warnings In my script editor there are errors: ')'Expected (to close '(' at line 45) near 'end' '' expected near 'end' ')' expected (to close '(' at line 53) near 'setPlayerMoney' Btw. Why setPlayerMoney? I didn't need that with element date cash right?
  5. Yay the text works now. I also get my cash when I die. But Solidsnake is right. When I reconnect it doesn't save. How to save this? Thanks so much guys
  6. [2011-03-06 23:18:16] WARNING: testmode\server.lua:25: Bad argument @ 'getElementData' And it must be there. My whole script function onLoginSetCash ( ) if not isGuestAccount ( getPlayerAccount ( source ) ) then if getElementData ( source, "data.cash" ) then outputChatBox ( "You're cash is transfered back!", source ) else setElementData ( source, "data.cash", 0 ) outputChatBox ( "You're new and your cash will now be saved." ) end end end function onWastedSetCash ( ) if not isGuestAccount ( getPlayerAccount ( source ) ) then local getPlayerCash = getElementData ( source, "data.cash" ) setElementData ( source, "data.cash", getPlayerCash + 100 ) outputChatBox ( "You got 100$ for your death.", source ) end end addEventHandler ( "onPlayerLogin", root, onLoginSetCash ) addEventHandler ( "onPlayerWasted", root, onWastedSetCash ) function myCash ( thePlayer ) local cash = getElementData ( source, "data.cash" ) outputChatBox ( "Your cash is: " .. tostring ( cash ), thePlayer ) end addCommandHandler ( "cash", myCash )
  7. Yes it works all.Well almost When I type /cash it says: Your cash is: false LOl? Warning at this line local cash = getElementData ( source, "data.cash" )
  8. Well. On sa-mp it's like 80$ for a Roleplay script because it costs so much time Not sure if it's the same here. I just started with MTA scripting
  9. Thanks for helping but, We're using element data cash now. You can see that in the posts above. I've edited it to this now function myCash ( thePlayer ) local cash = getPlayerCash ( thePlayer ) outputChatBox ( "Your cash is: " .. tostring ( cash ), thePlayer ) end addCommandHandler ( "cash", myCash ) Just no message shows up
  10. Alright. It shows me the outputchatbox texts. But will this save? Even when I reconnect? And can someone help me making the cmd to check my cash? I tried: function myCash ( thePlayer, commandName ) local cash = getPlayerCash ( thePlayer ) outputChatBox ( "Your cash is: " .. cash, thePlayer ) end addCommandHandler ( "cash", myCash ) And failed. No message shows up when I type /cash Thank you very much Proracer
  11. Nop. Even if I see the money thing. As proracer says: setPlayerMoney doesn't work for race. So can someone help me doing it with element data?
  12. Aaah proracer. I see. I already noticed that there was no money bar in the right cornor of the game. But can you please give an example on how to do this? Or send me the right wiki page? Because when I know how to make element data cash I can do much more.
  13. @ Bamby. We're talking about money saving here:P
  14. Damn. Still doesn't work I'm using the race script of MTA by the way. I put this in my race_server.lua
  15. Doesn't have effect again
  16. Hey guys,. Sorry that I'm asking something again but I want to save money but it doesn't work I've got no errors function onPlayerQuit ( ) -- when a player leaves, store his current money amount in his account data local playeraccount = getPlayerAccount ( source ) if ( playeraccount ) then local playermoney = getPlayerMoney ( source ) setAccountData ( playeraccount, "savemoney.money", playermoney ) end end function onPlayerLogin ( ) -- when a player joins, retrieve his money amount from his account data and set it local playeraccount = getPlayerAccount ( source ) if ( playeraccount ) then local playermoney = getAccountData ( playeraccount, "savemoney.money" ) -- make sure there was actually a value saved under this key (check if playermoney is not false). -- this will for example not be the case when a player plays the gametype for the first time if ( playermoney ) then setPlayerMoney ( source, playermoney ) end end end addEventHandler ( "onPlayerQuit", getRootElement ( ), onPlayerQuit ) addEventHandler ( "onPlayerLogin", getRootElement ( ), onPlayerLogin ) Please help
  17. Fixed! The standard admin panel script has a white name setter or something Thanks for helping EDIT: Wups. Sorry for dubble post
  18. Hey guys. I'm trying to make a createteam command here. function createATeam ( source, commandName, teamName ) local newTeam = createTeam ( teamName ) end addCommandHandler ( "createteam", createATeam) No errors or warnings. Itj ust has no effect. :*(
  19. Well. I think it should work like other gamemodes. It's just so weird. My chat name color is white. My kill list color is colored. So weird. Maybe someone else?
  20. Awesome it works now With your last code. But It only works in the kill list In the chat box my name is still white Can I chagne that as well? Thanks by the way PS I noticed the friend list is yours. Well it's so damn awesome
  21. EDIT: THe problem is that it only turns black.. I can't do another color than Black And it only works for kill list not for text box
  22. Hey guys, I'm making a /namecolor command so people can set their name color. I've followed instructions from the wiki here. function nametagColorChange ( thePlayer, commandName, r, g, b ) setPlayerNametagColor ( thePlayer, r, g, b ) outputChatBox("HINT:/namecolor [Colorid 0-250]") end addCommandHandler ( "namecolor", nametagColorChange) WARNING: race\race_server.lua:1431: Bad argument @ 'setPlayerNametagColor' It sends me the message: Hint:/namecolor [colorid 0-250] So I know it must be something with this line setPlayerNametagColor ( thePlayer, r, g, b ) So what could it be? Thanks
  23. bartje01

    Music

    Alright, my apologise. But I didn't mean that you're a stupid guy though. Well. I've really read the basics. I did it more times. Because a little while ago I was a bit into scripting MTA as well. I just couldn't find it. Sorry.
×
×
  • Create New...