[HELP] Buygun
#6

like this..

Quote:

if(!strcmp(cmdtext, "/buyShotgun", false))
{
if(!IsPlayerInRangeOfPoint(playerid, 3.5, /* your X, Y and Z goes here*/)) return SendClientMessage(playerid, 0xF0F0F0FF, "You are not in the black market!");
{
GivePlayerWeapon(playerid, 26, 500); //Give playerid sawnoff shotgun with 500 ammo
return 1;
}
You should add this in your gamemode under onplayercommandtext

you can make many command like "/buyshotgun" "/buytec" etc, but i recomend you to make a dialog which will look better and is easier to use.

Here is the full list of weapons: http://weedarr.wikidot.com/gunlist

Just take the gun id you want and place it instead of "weaponid"

GivePlayerWeapon(playerid, weaponid, 500); //500 is the ammo, you can change it too

Hope i helped
Reply


Messages In This Thread
[HELP] Buygun - by NotoriousMOB - 10.11.2010, 23:16
Re: [HELP] Buygun - by Haydz - 10.11.2010, 23:36
Re: [HELP] Buygun - by The_Moddler - 10.11.2010, 23:37
Re: [HELP] Buygun - by NotoriousMOB - 10.11.2010, 23:43
Re: [HELP] Buygun - by Haydz - 11.11.2010, 00:16
Re: [HELP] Buygun - by audifan00 - 11.11.2010, 00:20
Re: [HELP] Buygun - by NotoriousMOB - 11.11.2010, 00:29

Forum Jump:


Users browsing this thread: 1 Guest(s)