SA-MP Forums Archive
Weapon - 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: Weapon (/showthread.php?tid=663011)



Weapon - SeeNN - 18.01.2019

Hi,I have a problem,and I do not know what is it,I will leave code here,I have some errors. If someone know what is worng,I will wait here for an answer.
HTML Code:
if(CosminInfo[playerid][Coins] < 800), GetPlayerMoney(playerid) > 10000000), GivePlayerMoney(playerid -10000000) return SendError2(playerid, "{E4EDF4}Don't have enough coins and money! You need 800 coins and $10000000", "{E4EDF4}Nu ai destui coins si bani. Ai nevoie de 800 coins si $10000000");
			            else return GivePlayerWeapon(playerid, 35, 20), CosminInfo[playerid][Coins] -= 500, SendClientMessage(playerid, COLOR_YELLOW, "You bought an HS Rocket Launcher for 500 coins and and $5000000");
Errors:
HTML Code:
D:\Counter-Strike 1.6 - WaRzOnE\ESW\gamemodes\ESW.pwn(10401) : error 029: invalid expression, assumed zero
D:\Counter-Strike 1.6 - WaRzOnE\ESW\gamemodes\ESW.pwn(10401) : warning 215: expression has no effect
D:\Counter-Strike 1.6 - WaRzOnE\ESW\gamemodes\ESW.pwn(10401) : error 001: expected token: ";", but found ")"
D:\Counter-Strike 1.6 - WaRzOnE\ESW\gamemodes\ESW.pwn(10401) : error 029: invalid expression, assumed zero
D:\Counter-Strike 1.6 - WaRzOnE\ESW\gamemodes\ESW.pwn(10401) : fatal error 107: too many error messages on one line



Re: Weapon - xRadical3 - 18.01.2019

pawn Code:
if(CosminInfo[playerid][Coins] >= 800 && GetPlayerMoney(playerid) >= 10000000)
{
GivePlayerMoney(playerid -10000000);

GivePlayerWeapon(playerid, 35, 20);

CosminInfo[playerid][Coins] -= 800;

SendClientMessage(playerid, COLOR_YELLOW, "You bought an HS Rocket Launcher for 800 coins and and $10000000");
} else
{
SendError2(playerid, "{E4EDF4}Don't have enough coins and money! You need 800 coins and $10000000", "{E4EDF4}Nu ai destui coins si bani. Ai nevoie de 800 coins si $10000000");
}



Re: Weapon - SeeNN - 18.01.2019

Quote:
Originally Posted by Vizi10
View Post
pawn Code:
if(CosminInfo[playerid][Coins] >= 800 && GetPlayerMoney(playerid) >= 10000000)
{
GivePlayerMoney(playerid -10000000);

GivePlayerWeapon(playerid, 35, 20);

CosminInfo[playerid][Coins] -= 800;

SendClientMessage(playerid, COLOR_YELLOW, "You bought an HS Rocket Launcher for 800 coins and and $10000000");
} else
{
SendError2(playerid, "{E4EDF4}Don't have enough coins and money! You need 800 coins and $10000000", "{E4EDF4}Nu ai destui coins si bani. Ai nevoie de 800 coins si $10000000");
}
Thank's