31.03.2010, 12:55
Hi, could someone PLEASE help me with this script?
I know since they removed Sniper from the Buy Menu, i want to add it.
Im stuck at this part.
Could someone please help? The problem is: When i have lower then 10k (price for sniper) the money just goes on negative.
I dont know whats wrong.
Here:
thx for any help
I know since they removed Sniper from the Buy Menu, i want to add it.
Im stuck at this part.
Could someone please help? The problem is: When i have lower then 10k (price for sniper) the money just goes on negative.
I dont know whats wrong.
Here:
Quote:
if(strcmp(cmd, "/Sniper", true) == 0) { if (IsPlayerConnected(giveplayerid)) { GetPlayerName(giveplayerid, giveplayer, sizeof(giveplayer)); playermoney = GetPlayerMoney(playerid); if (moneys > 0 && playermoney >= moneys) GivePlayerMoney(playerid, (0 - moneys)); GivePlayerMoney(giveplayerid, moneys); SendPlayerFormattedText(playerid, "You have purchased a Sniper! (10 Bullets).",0); GivePlayerWeapon(playerid, 34, 10); GivePlayerMoney(playerid, -10000); } else { SendClientMessage(playerid, COLOR_YELLOW, "You dont have enough cash (You need 10'000)."); } return 1; } |
thx for any help