{Help} Gunshop
#1

I put in a gun shop in my server but i can type /buygun anywhere i want it so i can buy guns in the ammu nation how do i do this
Reply
#2

IsPlayerinRangeOfPoint(playerid, x, y, z);
Reply
#3

Quote:
Originally Posted by MatthewGarrowo
I put in a gun shop in my server but i can type /buygun anywhere i want it so i can buy guns in the ammu nation how do i do this
I guess this is what you are using

Код:
public OnPlayerCommandText(playerid, cmdtext[])
{
if (strcmp("/buygun", cmdtext, true, 11) == 0)
if(IsPlayerInRangeOfPoint(playerid, 7.0, x, y, z)) //example: if(IsPlayerInRangeOfPoint(playerid, 7.0, 291.8240,-83.3971,1001.5156))
{
ShowPlayerDialog(playerid, 20320, DIALOG_STYLE_LIST, "Weapon Shop", "Melee weapons\nPistols\nShotguns\nSubmachine Guns\nAutomatic Rifles\nSpecials\nBombs\nHealth and Armour", "Select", "Exit");
return 1;
}
Goodluck,

Jeroen.
Reply
#4

IsPlayerinRangeOfPoint(playerid, x, y, z); where do i put this i got the cords and how do i make it so my persons only got 1 gun in his hand instead of 2 like for the colt and the guns that you have to with i want it so its only 1
Reply
#5

Quote:
Originally Posted by MatthewGarrowo
IsPlayerinRangeOfPoint(playerid, x, y, z); where do i put this i got the cords and how do i make it so my persons only got 1 gun in his hand instead of 2 like for the colt and the guns that you have to with i want it so its only 1
You need to set a players weapon skill for that, search on samp wiki. you put it exactly on what I did.
So in your script you search for you command "/buygun" then under (I guess) if (IsPlayerConnected....) you add If (IsPlayerInRangeOfPo.......) "then coords"
Reply
#6

i still dont understand.......
Reply
#7

Quote:
Originally Posted by MatthewGarrowo
i still dont understand.......
you need to setplayerskill to use one handed guns
Reply
#8

SetPlayerSkill(playerid,50.0);

where do i put this in my script it keep givin me a error
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)