PDA

View Full Version : VIP Shop Help


Champ
16/01/2012, 02:17 PM
i have a vipshop and i have added a minigun in it but when the player bought minigun, the money was not decreasing this is script ↓
case 0:
{
if(GetPlayerMoney(playerid) < 100000) return ShowPlayerDialog(playerid, 1, DIALOG_STYLE_MSGBOX, "{FF3300} >E-R-R-O-R<", "{33FFCC} You Don't Have Enough Cash .","OK","Cancel");
GivePlayerWeapon(playerid,38,30);

format(vstr,sizeof(vstr),">> VIP Member %s has bought Minigun From VIP Shop",Name);

SendClientMessageToAll(COLOR_GREEN,vstr);
}


Help Please !

Snowman12
16/01/2012, 02:20 PM
case 0:
{
if(GetPlayerMoney(playerid) < 100000) return ShowPlayerDialog(playerid, 1, DIALOG_STYLE_MSGBOX, "{FF3300} >E-R-R-O-R<", "{33FFCC} You Don't Have Enough Cash .","OK","Cancel");
GivePlayerWeapon(playerid,38,30);
GivePlayerMoney(playerid, - minigun) // DEFINE YOUR PRICE.

format(vstr,sizeof(vstr),">> VIP Member %s has bought Minigun From VIP Shop",Name);

SendClientMessageToAll(COLOR_GREEN,vstr);
}

thimo
16/01/2012, 02:46 PM
You forgot to put in GivePlayerMoney(playerid, - 100000);
:)

Champ
16/01/2012, 07:01 PM
1 error

(2717) : error 001: expected token: ";", but found "-identifier-"

in this line

1 case 0:
2 {
3 if(GetPlayerMoney(playerid) < 100000) return ShowPlayerDialog(playerid, 1, DIALOG_STYLE_MSGBOX, "4{FF3300} >E-R-R-O-R<", "{33FFCC} You Don't Have Enough Cash .","OK","Cancel");
5 GivePlayerWeapon(playerid,38,30);
6 GivePlayerMoney(playerid, - 100000) // DEFINE YOUR PRICE.
7 format(vstr,sizeof(vstr),">> VIP Member %s has bought Minigun From VIP Shop",Name);
8 SendClientMessageToAll(COLOR_GREEN,vstr);
}

error in line 7

thimo
16/01/2012, 07:18 PM
So follow what the error says -_-" GivePlayerMoney(playerid, -1000000);