I need help
#1

Sorry guys for 2nd thread this day, but i faced a problem.
so, what im trying to do it
when someone types /ak47 it takes from him 100 and gives him an ak47
And if he doesn't have the amount of money is sends him 'you don't have enough amount of money'
So here's my code
pawn Код:
if (strcmp("/ak47", cmdtext, true, 10) == 0)
{
    if((GetPlayerMoney(playerid) >= 100)
    { // this is line 164
    SendClientMessage(playerid, 0xFF0000AA,"You bought an Ak47");
    GivePlayerWeapon(playerid, 30, 1000);
    GivePlayerMoney(playerid, -100);
    }
    else
    {
    if(GetPlayerMoney(playerid) < 100)
    {
    SendClientMessage(playerid, 0xFF0000AA,"You don't have enough money");
    }
    return 1;
}
And I got an ERROR that says
C:\Users\User\Desktop\Scripting\gamemodes\wassim.p wn(164) : error 028: invalid subscript (not an array or too many subscripts): "GetPlayerMoney"

-
Thanks much appreciated!
Reply


Messages In This Thread
I need help - by Trawltrawl - 07.04.2012, 14:29
Re: I need help - by Aira - 07.04.2012, 14:38
Re: I need help - by ivanVU - 07.04.2012, 14:41
Re: I need help - by Shabi RoxX - 07.04.2012, 14:42
Re: I need help - by Trawltrawl - 07.04.2012, 14:44
Re: I need help - by ivanVU - 07.04.2012, 14:45
Re: I need help - by Trawltrawl - 07.04.2012, 14:49
Re: I need help - by ivanVU - 07.04.2012, 14:52
Re: I need help - by Shabi RoxX - 07.04.2012, 14:56
Re: I need help - by DaRealShazz - 18.05.2012, 03:20

Forum Jump:


Users browsing this thread: 1 Guest(s)