Buy Sniper
#1

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:

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
Reply


Messages In This Thread
Buy Sniper - by Jatoofer - 31.03.2010, 12:55
Re: Buy Sniper - by Jay420 - 31.03.2010, 16:05
Re: Buy Sniper - by Jatoofer - 01.04.2010, 13:10
Re: Buy Sniper - by DarkPower - 01.04.2010, 13:13

Forum Jump:


Users browsing this thread: 1 Guest(s)