LuxAdmin Bug - Printable Version
+- SA-MP Forums Archive (
https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (
https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (
https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: LuxAdmin Bug (
/showthread.php?tid=381093)
LuxAdmin Bug -
Saleem - 28.09.2012
Heya Mate's
I got An Problem On LuxAdmin With That Command /Giveallweapon
When I enter that command on Screen showing Admin Saleem Has Given All Players "a" with 38 ammo :
Now Problem is Its Not Showing Weapon Name Showing only "a" ANd Wrong Amount f Ammo
Re: LuxAdmin Bug -
HardBoy - 28.09.2012
thats eazy
give me you id and pass of teamviewer to fix it for you
Re: LuxAdmin Bug -
Saleem - 28.09.2012
Here Is Code "
Код:
dcmd_giveallweapon(playerid,params[])
{
if(AccInfo[playerid][Level] >= 4)
{
new tmp[256], tmp2[256], Index;
new ammo, weap, WeapName[32];
new string[128];
tmp = strtok(params,Index); tmp2 = strtok(params,Index);
if(!strlen(tmp)) return
SendClientMessage(playerid, LIGHTBLUE2, "Usage: /giveallweapon [WeaponID or WeaponName] [Ammo]") &&
SendClientMessage(playerid, orange, "Function: Will give a specified weapon and ammo for all players");
if(!strlen(tmp2) || !IsNumeric(tmp2) || strval(tmp2) <= 0 || strval(tmp2) > 99999) ammo = 500;
if(!IsNumeric(tmp))
weap = GetWeaponIDFromName(tmp);
else weap = strval(tmp);
if(!IsValidWeapon(weap))
return SendClientMessage(playerid,red,"ERROR: Invalid Weapon ID");
SendCommandToAdmins(playerid,"GiveAllWeapon");
for(new i = 0; i < MAX_PLAYERS; i++)
{
if(IsPlayerConnected(i))
{
PlayerPlaySound(i,1057,0.0,0.0,0.0);
GivePlayerWeapon(i,weap,ammo);
}
}
GetWeaponName(weap, WeapName, sizeof(WeapName));
format(string,sizeof(string),"{F3FF02}Administrator {6EF83C}\"%s\" {F2AE0F}has Given all Players a %'s'' (%d)With %d Ammo -|", pName(playerid), WeapName, weap, ammo);
return SendClientMessageToAll(blue, string);
}
else return ErrorMessages(playerid, 1);
}
Re: LuxAdmin Bug -
NoahF - 28.09.2012
Код:
format(string,sizeof(string),"{F3FF02}Administrator {6EF83C}\"%s\" {F2AE0F}has Given all Players a %'s'' (%d)With %d Ammo -|", pName(playerid), WeapName, weap, ammo);
Код:
format(string,sizeof(string),"{F3FF02}Administrator {6EF83C}\"%s\" {F2AE0F}has Given all Players a %s (%d)With %d Ammo -|", pName(playerid), WeapName, weap, ammo);
It should be fixed.