Jump to content

[REQ]Take money


Launo112

Recommended Posts

Posted

Hi, my english is very bad, but i try to explain what i need.

When player presses to the button called "save" then it's gonna take automatically $2500, how can i do that?

At the moment it's such

GUIEditor_Button[11] = guiCreateButton(144,60,41,16,"Save",false,GUIEditor_Tab[6]) 
GUIEditor_Button[12] = guiCreateButton(145,133,41,16,"Save",false,GUIEditor_Tab[6]) 

I know my english sucks... :/

Posted

we are not fullfilling requests here, remember that.

you need to learn a lot about scripting i think, because only thing you have is the generated gui i see..

you will need:

addEventHandler

onClientGUIClick

triggerServerEvent

and on server side:

addEvent

addEventHandler

takePlayerMoney

use wiki - https://wiki.multitheftauto.com/ - and its search feature to know more. there is example within every page. also check scripting tutorial if you are new to lua: https://wiki.multitheftauto.com/wiki/Scr ... troduction

And i have seen many users with much worse English than yours :P

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)!

Posted

you need server-side

like this

addEvent("onsave", true) 
addEventHandler("onsave", getRootElement(), 
function() 
      if ( getPlayerMoney (source) >= 2500 ) then 
        takePlayerMoney(source, 2500) 
        outputChatBox(............................", getRootElement(),0,255,0) 
      else 
    outputChatBox ("You not have enough Money!", source, 255, 0, 0, false) 
    end 
  end 
) 

CiTLh.png
Posted
Actually i have them all, but only thing what is missing is "takePlayerMoney".

if this is true i think he solved this already, maybe stop bumping this, as there is no need to do that .. ?

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)!

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...