- 0
Problema givegunrange
-
Similar Content
-
- 2 replies
- 116 views
-
- 3 answers
- 177 views
-
- 11 replies
- 242 views
-
- 2 replies
- 130 views
-
- 2 answers
- 168 views
-
-
Recently Browsing 0 members
- No registered users viewing this page.
We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue. For more details you can also review our Terms of Use and Privacy Policy.
Question
Edduard
Problema intalnita (descriere):Problema este ca , eu dau /givegunrange 38 si 1 (adica sa dea doar la un metru) si ea da la tot svr
Ero(area / rile) / warning-(ul / urile):
Liniile de cod / sursa / script-ul(obligatoriu):
CMD:givegunrange(playerid, params[])
Edited by Edduard{
if(playerVariables[playerid][pAdminLevel] >= 2)
{
new gun,sendername[25],string[128],range;
new Float:x, Float:y, Float:z;
GetPlayerPos(playerid, x,y,z);
if(sscanf(params, "ii", gun,range)) return SendClientMessage(playerid, COLOR_GRAD2, "USAGE: /givegunrange [weapon id] [range]");
{
if(gun > 0 && gun < 47)
{
for(new i,g=GetMaxPlayers(); i < g; i ++)
{
if(IsPlayerConnected(i))
{
if(IsPlayerInRangeOfPoint(i,range*1000,x,y,z))
{
GetPlayerName(playerid, sendername, sizeof(sendername));
format(string, sizeof(string), "Admin %s has given you gun id %d.", sendername, gun);
SendClientMessage(i, COLOR_IN2, string);
GivePlayerWeapon(i, gun, 999);
Weapon = 1;
playerVariables[pJetpack] = 1;
}
}
}
}
else return SendClientMessage(playerid, COLOR_WHITE, "{FFFFCC}Error: Invalid weapon id.");
}
}
else return SendClientMessage(playerid, COLOR_WHITE, AdminOnly);
return 1;
}
Imagini / Video (optional):
Ati incercat sa rezolvati singur?: cred ca ar putea fii de aici if(IsPlayerInRangeOfPoint(i,range*1000,x,y,z)) dar nu stiu sigur ar trebui sa pun 1
SKIPE : EDUARD.SENNOW
Link to comment
Share on other sites
5 answers to this question
Recommended Posts