LuxAdmin Bug
#3

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);
}
Reply


Messages In This Thread
LuxAdmin Bug - by Saleem - 28.09.2012, 08:36
Re: LuxAdmin Bug - by HardBoy - 28.09.2012, 08:38
Re: LuxAdmin Bug - by Saleem - 28.09.2012, 08:43
Re: LuxAdmin Bug - by NoahF - 28.09.2012, 10:47

Forum Jump:


Users browsing this thread: 1 Guest(s)