DrifteR Posted November 2, 2010 Posted November 2, 2010 (edited) 1st: I'm stupid 2nd: help with this code: local onlocation = false location = createMarker ( -1180, 75.7, 17, "cylinder", 3) local ticket = false gatecol = createColCircle ( -1180, 75.7, 17, 3 ) function onlocationchange() onlocation = true outputChatBox ( "How can i help you(/ticket)" ,thePlayer) end addEventHandler( "onColShapeHit", gatecol, onlocationchange ) function leaveloc () onlocation = false outputChatBox ( "Good Bye!" ,thePlayer) end addEventHandler( "onColShapeLeave", gatecol, leaveloc ) function buyticket () local money = getPlayerMoney(thePlayer) if money-100<=0 then outputChatBox ( "You Dont Have enough money" ,thePlayer) else if onlocation == true then setPlayerMoney(thePlayer,money-100) end end end addCommandHandler ("ticket",buyticket) When i enter/exti the marker/ColShape i don't get the messages...help Edited November 3, 2010 by Guest
dzek (varez) Posted November 2, 2010 Posted November 2, 2010 createColCircle takes 3 arguments, you gave 4 (but this shouldnt be a problem). is this server side? also giving tickets like you probably want it to do will cause EVERY player to have it. also read about takePlayerMoney (much easier) and isElementWithinColshape (no need to handle hit/leave just to set variable (but if you want to leave that messages - its nesseceary, but you can remove variables anyway)
J.S. Posted November 2, 2010 Posted November 2, 2010 [troll=warning][/troll] You spelled good wrong by the way
DrifteR Posted November 3, 2010 Author Posted November 3, 2010 No... is on the client side Edit : IF I CAN GET THAT STUPID SERVER STARTED!!! X(
Discord Moderators Zango Posted November 3, 2010 Discord Moderators Posted November 3, 2010 No... is on the client side What is the point in this for example then? outputChatBox ( "How can i help you(/ticket)" ,thePlayer) As far as I know, clientside cannot output messages to someone else's chat clientside outputChatBox outputChatBox ( string text [, int r=255, int g=255, int b=255, bool colorCoded=false ] )
Discord Moderators Zango Posted November 3, 2010 Discord Moderators Posted November 3, 2010 ok and that means
DrifteR Posted November 3, 2010 Author Posted November 3, 2010 in front of a virtual player,( that doesn't exist?), just the character
dzek (varez) Posted November 3, 2010 Posted November 3, 2010 event are also serverside.. just change it to serverside DrifteR
DrifteR Posted November 3, 2010 Author Posted November 3, 2010 thnx, i'll see if it work's ok:D Now i have even more problems
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