08.07.2009, 22:13
pawn Код:
if(strcmp("/buyspaz ",cmdtext,true) == 0)
{
if(GetPlayerMoney(playerid) < INSERT_AMOUNT_HERE)
{
SendClientMessage(playerid, 0xF0F8FFAA, " You do not have enough money.");
return 1;
}
SendClientMessage(playerid, 0xF0F8FFAA, " You just bought a spaz for $INSERT_AMOUNT_HERE, have fun :)");
GivePlayerWeapon(playerid, 25, 250);
return 1;
}
%1 - The players id
%2 - The gun id, (check the wiki link below for more help)
%3 - The amount of ammo
Change "INSERT_AMOUNT_HERE" with the amount you want the money to be. Also if you would like them to get a different amount of ammo, change the 250 to whatever you want.
Also, this may help with weapon codes:
https://sampwiki.blast.hk/wiki/Weapons