Jump to content

HELP ME with money and points


X-Man

Recommended Posts

hello..i am new in mta....i have my own server..i uploaded all needed resurces....but i have one problem...i dont know how to make money and points system for my server....i want that playerts on end of rece 1,2 and 3 ng get money and points......so pls help me PLS be bro pls :|

Link to comment
Xmen if you do pay GanJaRuleZ ur basically not going to get what you need.

Well csmit , maybe im not good in scripting , but the race part is my specialty , maybe he will pay someone else , since i don't need money , i gave him an option . But i don't want to start fight here , i'm not here to fight or to argue , i'm here to help people , and please don't post just to get higher posts count.

That part is basically easy..

  
  
addEvent("onPlayerFinish",true)  
addEventHandler("onPlayerFinish",getRootElement(),  
    function (rank,finishtime) 
         if rank == 1 then  
             givePlayerMoney(source,1000) 
             setElementData( source, "Points", +3 ) 
        end 
        if rank == 2 then 
            givePlayerMoney(source,500) 
           setElementData( source, "Points", +2 ) 
        end 
        if rank == 3 then 
           givePlayerMoney(source,100) 
           setElementData( source, "Points", +1 ) 
        end 
    end) 
) 
  

Btw , from now you must make the script for yourself

Edited by Guest
Link to comment
  
addEvent("onPlayerFinish",true)  
addEventHandler("onPlayerFinish",getRootElement(),  
    function (rank,finishtime) 
      local account = getPlayerAccount(source) 
      if isGuestAccount(account) then 
       outputChatBox("You must be logged in to get the points and cash" , source, 255, 0, 0, true) 
     else 
         if rank == 1 then  
             givePlayerMoney(source,1000) 
             setAccountData( account, "Points", +3 ) 
        end 
        if rank == 2 then 
            givePlayerMoney(source,500) 
           setAccountData( account, "Points", +2 ) 
        end 
        if rank == 3 then 
           givePlayerMoney(source,100) 
           setAccountData( account, "Points", +1 ) 
        end 
        end 
    end) 
) 
  

Happy?

Here to learn scripting : http://wiki.multitheftauto.com/wiki/Scr ... troduction

Link to comment

It wasnt an insult it was just a "mean" way of helping. Sorry lol :D But im pretty sure that won't help :D. I think there is an issue with setAccountData.

You used:

addEvent("onPlayerFinish",true) 
addEventHandler("onPlayerFinish",getRootElement(), 
    function (rank,finishtime) 
      local account = getPlayerAccount(source) 
      if isGuestAccount(account) then 
       outputChatBox("You must be logged in to get the points and cash" , source, 255, 0, 0, true) 
     else 
         if rank == 1 then 
             givePlayerMoney(source,1000) 
             setAccountData( account, "Points", +3 ) 
        end 
        if rank == 2 then 
            givePlayerMoney(source,500) 
           setAccountData( account, "Points", +2 ) 
        end 
        if rank == 3 then 
           givePlayerMoney(source,100) 
           setAccountData( account, "Points", +1 ) 
        end 
        end 
    end) 
) 

Should be:

  
addEvent("onPlayerFinish",true) 
addEventHandler("onPlayerFinish",getRootElement(), 
    function (rank,finishtime) 
      local account = getPlayerAccount(source) 
      if isGuestAccount(account) then 
       outputChatBox("You must be logged in to get the points and cash" , source, 255, 0, 0, true) 
     else 
         if rank == 1 then 
             givePlayerMoney(source,1000) 
             setAccountData( account, "Points", getAccountData(account, "Points")+3 ) 
        end 
        if rank == 2 then 
            givePlayerMoney(source,500) 
           setAccountData( account, "Points", getAccountData(account, "Points")+2 ) 
        end 
        if rank == 3 then 
           givePlayerMoney(source,100) 
           setAccountData( account, "Points", getAccountData(account, "Points")+1 )  
        end 
        end 
    end) 
) 
  

Link to comment

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...