case DIALOG_WEAPONS:
{
if( response )
{
switch( listitem )
{
case 0:
{
if( response )
{
if(GetPlayerMoney(playerid) <= 1000) || GetPlayerMoney(playerid) -1000);
{
echo(playerid,COLOR_DARKRED,"You have not enough money!");
}
else
{
GivePlayerWeapon(playerid, WEAPON_MP5, 50);
echo(playerid,COLOR_BLUE,"You baught a MP5 with 50 rounds of ammo!");
}
}
case DIALOG_WEAPONS:
{
if( response )
{
switch( listitem )
{
case 0:
{
if( response )
{
if(GetPlayerMoney(playerid) < 1000));
{
SendClientMessage(playerid,COLOR_DARKRED,"You have not enough money!");
}
else
{
GivePlayerWeapon(playerid, WEAPON_MP5, 50);
SendClientMessage(playerid,COLOR_BLUE,"You baught a MP5 with 50 rounds of ammo!");
}
}
if(GetPlayerMoney(playerid) <= 1000) || GivePlayerMoney(playerid) -1000);
C:\Users\Nick\Desktop\Call Of Duty - Engine SA-MP\gamemodes\Untitled.pwn(357) : error 029: invalid expression, assumed zero
C:\Users\Nick\Desktop\Call Of Duty - Engine SA-MP\gamemodes\Untitled.pwn(357) : warning 202: number of arguments does not match definition
C:\Users\Nick\Desktop\Call Of Duty - Engine SA-MP\gamemodes\Untitled.pwn(357) : warning 215: expression has no effect
C:\Users\Nick\Desktop\Call Of Duty - Engine SA-MP\gamemodes\Untitled.pwn(357) : error 001: expected token: ";", but found ")"
C:\Users\Nick\Desktop\Call Of Duty - Engine SA-MP\gamemodes\Untitled.pwn(357) : error 029: invalid expression, assumed zero
C:\Users\Nick\Desktop\Call Of Duty - Engine SA-MP\gamemodes\Untitled.pwn(357) : fatal error 107: too many error messages on one line
case DIALOG_WEAPONS:
{
if( response )
{
switch( listitem )
{
case 0:
{
if(GetPlayerMoney(playerid) <= 1000);
{
echo(playerid,COLOR_DARKRED,"You have not enough money!");
}
else
{
GivePlayerWeapon(playerid, WEAPON_MP5, 50);
echo(playerid,COLOR_BLUE,"You baught a MP5 with 50 rounds of ammo!");
}
}
if GetPlayerMoney(playerid)=< 1000) || GetPlayerMoney(playerid) == -1000);
Idk, but if response is not the problem. The problem is GetplayerMoney, I want to check if a player has 1.000 money and then I want get 1.000 from the player.
Seems like this. pawn Код:
|
if(GetPlayerMoney(playerid) >= 1000)
{
SetPlayerMoney(playerid,GetPlayerMoney(playerid)-1000);
}