29.09.2016, 04:24
Wrong section but I can help u
Number 1
This is set armor all, you can edit it to health
Number 2
Number 4:
https://sampforum.blast.hk/showthread.php?tid=253451
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; }
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; }
https://sampforum.blast.hk/showthread.php?tid=253451