Quantcast

Jump to content

» «
Photo

[SA] Set money when wasted

4 replies to this topic
pxltdaapl
  • pxltdaapl

    Player Hater

  • New Members
  • Joined: 03 Aug 2014
  • None

#1

Posted 03 August 2014 - 07:09 PM

Hello everyone! I'm new to the whole coding thing and I want to make a script mod which sets your money to 0 when you die.

I tried to make it myself but it crashes SA when it loads a new game.

Can you help me fix my script?

 

:START
if Actor.Dead($PLAYER_CHAR)
Player.Money($PLAYER_CHAR) += -999999999999
jump @START
 
I know it might be totally wrong, but I have no clue what I'm doing. I used -999999999999 because I'm not sure if you can set money or just add or take.
Please help.
 
Thanks a lot :)

I see I forgot to add 'then', I tried to add it and it is still crashing


_DK
  • _DK

    Homie

  • Feroci Racing
  • Joined: 12 Apr 2009
  • Ukraine

#2

Posted 04 August 2014 - 06:12 AM

{$CLEO}
 
0000:
while true
    wait 0
    if
        actor.Dead($PLAYER_ATOR)
    then
        player.Money($PLAYER_CHAR) = 0
    end
end
  • Methical likes this

pxltdaapl
  • pxltdaapl

    Player Hater

  • New Members
  • Joined: 03 Aug 2014
  • None

#3

Posted 04 August 2014 - 09:25 AM

{$CLEO}
 
0000:
while true
    wait 0
    if
        actor.Dead($PLAYER_ATOR)
    then
        player.Money($PLAYER_CHAR) = 0
    end
end

It works now, thanks a lot, but it can't compile when i use player.Money($PLAYER_CHAR) = 0. When I use Money($PLAYER_CHAR) += -99999999999, then it works. I need it to set player's money to 0.

Is it possible to do?

Thanks for helping me :)


_DK
  • _DK

    Homie

  • Feroci Racing
  • Joined: 12 Apr 2009
  • Ukraine

#4

Posted 04 August 2014 - 09:52 AM

{$CLEO}
 
0000:
while true
    wait 0
    if
        actor.Dead($PLAYER_ATOR)
    then
        0A8C: write_memory 0xB7CE50 size 4 value 0 virtual_protect 0
    end
end

pxltdaapl
  • pxltdaapl

    Player Hater

  • New Members
  • Joined: 03 Aug 2014
  • None

#5

Posted 04 August 2014 - 01:37 PM

{$CLEO}
 
0000:
while true
    wait 0
    if
        actor.Dead($PLAYER_ATOR)
    then
        0A8C: write_memory 0xB7CE50 size 4 value 0 virtual_protect 0
    end
end

Thanks a bunch, man! It works perfectly!





1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users