07.04.2012, 14:29
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
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!
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;
}
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!