[SOLVED]Get Player Money - 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: [SOLVED]Get Player Money (
/showthread.php?tid=91011)
[SOLVED]Get Player Money -
Criss_Angel - 11.08.2009
well, i want it so if the guy doesn't have enough money he doesn't go into -
Код:
if (strcmp("/buygun ak47", cmdtext, true) == 0)
{
if(GetPlayerMoney(playerid) == 0)
{
SendClientMessage(playerid,0xAA3333AA, "Fuck you , you dont have the money");
}
else
{
SendClientMessage(playerid,0xAA3333AA, "Thank you for buying an Ak47,have fun with it");
GivePlayerMoney(playerid,-3500);
GivePlayerWeapon(playerid,30,470);
}
}
return 1;
}
Re: Get Player Money -
RyDeR` - 11.08.2009
Код:
if (strcmp("/buygun ak47", cmdtext, true) == 0)
{
if(GetPlayerMoney(playerid) <3500) return SendClientMessage(playerid,0xAA3333AA, "Fuck you , you dont have the money");
SendClientMessage(playerid,0xAA3333AA, "Thank you for buying an Ak47,have fun with it");
GivePlayerMoney(playerid,-3500);
GivePlayerWeapon(playerid,30,470);
return 1;
}
Re: Get Player Money -
RyDeR` - 11.08.2009
Quote:
Originally Posted by djlobo[Awesome-games.tk
]
Quote:
Originally Posted by Criss_Angel
well, i want it so if the guy doesn't have enough money he doesn't go into -
Код:
if (strcmp("/buygun ak47", cmdtext, true) == 0)
{
if(GetPlayerMoney(playerid) < 3500) return SendClientMessage(playerid, COLOR_RED, "not have enough money");
{
SendClientMessage(playerid,0xAA3333AA, "Thank you for buying an Ak47,have fun with it");
GivePlayerMoney(playerid,-3500);
GivePlayerWeapon(playerid,30,470);
}
}
return 1;
}
|
|
Wrong

You have 2 times of this { and 3 times of this }
Re: [SOLVED]Get Player Money -
radi - 11.08.2009
both wrong
pawn Код:
if (strcmp("/buygun ak47", cmdtext, true) == 0)
{
if(GetPlayerMoney(playerid) < 3500)
{
SendClientMessage(playerid, COLOR_RED, "not have enough money");
}
else
{
SendClientMessage(playerid,0xAA3333AA, "Thank you for buying an Ak47,have fun with it");
GivePlayerMoney(playerid,-3500);
GivePlayerWeapon(playerid,30,470);
}
return 1;
}
Re: [SOLVED]Get Player Money -
RyDeR` - 11.08.2009
Quote:
Originally Posted by radi
both wrong
|
No, mine was correct what wrong? :S
Re: [SOLVED]Get Player Money -
Davz*|*Criss - 08.03.2011
-Cut-
Due to its already solved, By mistake created.