Been looking for about an hour.
#3

Quote:
Originally Posted by ǝɹoɯ‾ʎ
pawn Код:
if(strcmp("/buyspaz ",cmdtext,false,3) == 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;
}
GivePlayerWeapon(%1,%2,%3);
%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
Wow!

Thank you so much for the fast reply, and I had no idea that "Giveplayerweapon" Even exsisted, haha..

Once again, thanks so much for replying within 2 minutes.
Reply


Messages In This Thread
Been looking for about an hour. - by whereschris - 08.07.2009, 22:06
Re: Been looking for about an hour. - by Chaprnks - 08.07.2009, 22:13
Re: Been looking for about an hour. - by whereschris - 08.07.2009, 22:16
Re: Been looking for about an hour. - by Weirdosport - 08.07.2009, 22:17
Re: Been looking for about an hour. - by Chaprnks - 08.07.2009, 22:19
Re: Been looking for about an hour. - by whereschris - 08.07.2009, 22:19
Re: Been looking for about an hour. - by Weirdosport - 08.07.2009, 22:19
Re: Been looking for about an hour. - by Chaprnks - 08.07.2009, 22:20
Re: Been looking for about an hour. - by whereschris - 08.07.2009, 22:22
Re: Been looking for about an hour. - by Chaprnks - 08.07.2009, 22:23

Forum Jump:


Users browsing this thread: 1 Guest(s)