I need that Commands!!! can?
#4

Wrong section but I can help u
Number 1
Код:
CCMD:setarmorall(playerid, params[])
{
    new armor;
    if(sscanf(params, "d", armor)) {
        SendClientMessageEx(playerid, COLOR_GREY, "USAGE: /setarmorall [armor]");
        return 1;
    }

    if (PlayerInfo[playerid][pAdmin] >= 1337) {
        foreach(new i: Player)
		{
            SetPlayerArmor(i, armor);
        }
    }

    else {
        SendClientMessageEx(playerid, COLOR_GRAD1, "You are not authorized to use that command.");
    }
    return 1;
}
This is set armor all, you can edit it to health
Number 2
Код:
CMD:setname(playerid, params[])
{
	new giveplayerid, string[128], name[MAX_PLAYER_NAME];
	if(sscanf(params, "us[24]", giveplayerid, name)) return SendClientMessageEx(playerid, COLOR_WHITE, "USAGE: /setname [playerid] [newname]");

	if(IsPlayerConnected(giveplayerid))
	{
		if (PlayerInfo[playerid][pAdmin] >= 4)
		{
		    if(strlen(name) > MAX_PLAYER_NAME)
			{
				format(string, sizeof(string), "You can't select a name that's above %d characters.", MAX_PLAYER_NAME);
				return SendClientMessageEx(playerid, COLOR_WHITE, string);
			}
			new query[128], tmpName[MAX_PLAYER_NAME];
			mysql_escape_string(name, tmpName);
			if(strcmp(name, tmpName, false) == 0)
			{
	   			SetPVarString(playerid, "OnSetName", tmpName);

				format(query, sizeof(query), "SELECT `Username` FROM `accounts` WHERE `Username`='%s'", tmpName);
				mysql_function_query(MainPipeline, query, true, "OnSetName", "ii", playerid, giveplayerid);
			}
			else return SendClientMessageEx(playerid, COLOR_GRAD2, "Invalid characters!");
		}
		else
		{
			SendClientMessageEx(playerid, COLOR_GRAD2, "You aren't authorised to use this command.");
		}
	}
	else
	{
		SendClientMessageEx(playerid, COLOR_GRAD2, "No Such Player");
	}
	return 1;
}
Number 4:
https://sampforum.blast.hk/showthread.php?tid=253451
Reply


Messages In This Thread
I need that Commands!!! can? - by vikoo - 28.09.2016, 17:40
Re: I need that Commands!!! can? - by iLearner - 28.09.2016, 17:55
Re: I need that Commands!!! can? - by vikoo - 28.09.2016, 18:01
Re: I need that Commands!!! can? - by HoangNam - 29.09.2016, 04:24

Forum Jump:


Users browsing this thread: 1 Guest(s)