SA-MP Forums Archive
Money Problem - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+---- Forum: Help Archive (https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: Money Problem (/showthread.php?tid=250971)



Money Problem - muhib777 - 25.04.2011

http://pastebin.com/28gffk37

As soon as someone spawns they lose $100 i checked my script and cant see whats wrong can anyone help?


Re: Money Problem - Laronic - 25.04.2011

You mean that they loost $100 after they have died then spawn?

if so, add
pawn Код:
GivePlayerMoney(playerid, 100);
under OnPlayerSpawn(playerid)

EDIT: at your post under here

Lets say you have $500.
You said you loose $100 at spwn right?

If you loose $100 at spawn and then you give the player $100 at spawn, how much will that be?

it will be $500 with other words, he didnt loose any money


Re: Money Problem - muhib777 - 25.04.2011

nop does not work it ends up giving them $100 instead


Re: Money Problem - [SFA]SpiRRiT - 25.04.2011

Offcourse a player won't lose any money.. You haven't set the code for it..

pawn Код:
public OnPlayerSpawn(playerid)
{
        SetPlayerPos(playerid, 1544.220703125,-1352.8216552734,329.47515869141);
        SendClientMessage(playerid, 0xFFAE1CFF, "Do /Teamhelp to choose a team");
        SetPlayerHealth(playerid, 99999);
        return 1;
}
This is what you should do:

pawn Код:
public OnPlayerSpawn(playerid)
{
        SetPlayerPos(playerid, 1544.220703125,-1352.8216552734,329.47515869141);
        SendClientMessage(playerid, 0xFFAE1CFF, "Do /Teamhelp to choose a team");
        SetPlayerHealth(playerid, 99999);
        GivePlayerMoney(playerid, -100);
        return 1;
}



Re: Money Problem - muhib777 - 25.04.2011

its making the person lose money everytime with that ^


Re: Money Problem - [SFA]SpiRRiT - 25.04.2011

Quote:
Originally Posted by muhib777
Посмотреть сообщение
its making the person lose money everytime with that ^
Isn't that what you want?


Re: Money Problem - muhib777 - 25.04.2011

no the problem is when someone spawn they get theyre cash gets reduced by $100
i dont know whats wrong i dont want that to happen


Re: Money Problem - iJumbo - 25.04.2011

prob some fs installed .. check all your fs and see if have some -100 money ^^


AW: Money Problem - xerox8521 - 25.04.2011

It might be an FS..but on Default on Gta San Andreas and Samp you lose $100 for every respawn..


Re: Money Problem - Mean - 25.04.2011

Try this, since giving 100 back will end up giving 100, so probbably any GivePlayerMoney stops it:
pawn Код:
public OnPlayerSpawn(playerid)
{
    SetPlayerPos(playerid, 1544.220703125,-1352.8216552734,329.47515869141);
    SendClientMessage(playerid, 0xFFAE1CFF, "Do /Teamhelp to choose a team");
    SetPlayerHealth(playerid, 99999);
    GivePlayerMoney( playerid, 0 );
    return 1;
}