Help me! - 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)
+--- Thread: Help me! (
/showthread.php?tid=472914)
Help me! -
kingcrome - 31.10.2013
I am trying to make it so if the player does not have enogh money he can not buy it can i please have some help.
Code:
if (strcmp("/shotgun", cmdtext, true, 10) == 0)
{
GivePlayerWeapon(playerid, 25, 102);
GivePlayerMoney(playerid, -15000 );
SendClientMessage(playerid, 0xAA3333AA, "You have been given a shotgun");
}
HELP ME PLEASE
Re: Help me! -
Konstantinos - 31.10.2013
pawn Код:
if (strcmp("/shotgun", cmdtext, true, 8) == 0)
{
if(GetPlayerMoney(playerid) < 15000) return SendClientMessage(playerid, 0xFF0000FF, "You do not have enough money");
GivePlayerWeapon(playerid, 25, 102);
GivePlayerMoney(playerid, -15000 );
SendClientMessage(playerid, 0xAA3333AA, "You have been given a shotgun");
return 1;
}
Re: Help me! -
kingcrome - 31.10.2013
Thanks !