xeon17 Posted January 11, 2014 Posted January 11, 2014 Here is my prop script but i have a problem , i want when a player get in marker he get in chatbox then he get this text in chatbox but that no work.. if(isElementWithinMarker(player,marker)) then outputChatBox ( "#00FFFF [PROP] To buy the prop write /prop1 (Cost:10.000$)", player, 0, 0, 0, true) i crated a command who let players buy the prop , but when he write the command /prop1 else return end local money = getPlayerMoney(player) if (money >= 10000) then takePlayerMoney(player, 10000) outputChatBox ( "#00FFFF [PROP] You buyed the PROP !", player, 0, 0, 0, true) When the player write /prop1 , then he get outputChatBox ( "#00FFFF [PROP] To buy the prop write /prop1 (Cost:10.000$)", player, 0, 0, 0, true) [/lua] can someone help me? i want when player / element get in contact with the marker he get outputChatBox ( "#00FFFF [PROP] To buy the prop write /prop1 (Cost:10.000$)", player, 0, 0, 0, true) [/lua] in chatbox A unique GangWar gamemode waiting for you!Click here for more information.
Memory Posted January 11, 2014 Posted January 11, 2014 local MyMarker = ... function MarkerHit() outputChatBox ( "#FF00FF [PROP] To buy the prop write /prop1 (Cost:10.000$)", source, 255, 255, 255, true) end addEventHandler( "onMarkerHit", MyMarker, MarkerHit ) function buyProp (thePlayer, matchingDimension) if isElementWithinMarker(thePlayer, MyMarker) then local money = getPlayerMoney(thePlayer) if (money >= 10000) then takePlayerMoney(thePlayer, 10000) outputChatBox ( "#FF00FF [PROP] You buyed the PROP !", thePlayer, 255, 255, 255, true) ---Your function else outputChatBox ( "#00FFFF [PROP] You haven't enough money", thePlayer, 255, 255, 255, true) end else outputChatBox("You are not at the right place!", thePlayer, 255, 0, 0) end end addCommandHandler("prop1", buyProp) Ingame name: [sV]Kostya Name in scripts: Kostya
xeon17 Posted January 11, 2014 Author Posted January 11, 2014 Thank you is perfect 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