11.11.2010, 00:20
like this..
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
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 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