SA-MP Forums Archive
Ajutati-ma cu comanda /makeadmin - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: Non-English (https://sampforum.blast.hk/forumdisplay.php?fid=9)
+--- Forum: Languages (https://sampforum.blast.hk/forumdisplay.php?fid=33)
+---- Forum: Română/Romanian (https://sampforum.blast.hk/forumdisplay.php?fid=40)
+---- Thread: Ajutati-ma cu comanda /makeadmin (/showthread.php?tid=609507)



Ajutati-ma cu comanda /makeadmin - Calinut200 - 13.06.2016

Salut,vreau sa ma ajutati cu ceva.Am o comanda /makeadmin si vreau sa imi scrie cand dau admin:Ai oferit admin level X playerului X.
Aceasta este codu:
CMD:makeadmin(playerid, params[])
{
if(IsPlayerAdmin(playerid)||PlayerInfo[playerid][pAdmin] >= 7)
{
new id, string[128], level;
if(sscanf(params, "dd", id, level)) return SendClientMessage(playerid, -1, "{FF0000}INFO:{FFFFFF}: /makeadmin [id] [level]");
format(string, sizeof(string), "{FF0000}INFO:{FFFFFF}Ai fost promovat de administrator la admin level %d.", level);
SendClientMessage(id, -1, string);
PlayerInfo[id][pAdmin] = level;
}
else SendClientMessage(playerid, -1, "{FF0000}INFO:{FFFFFF}Nu ai acces la aceasta comanda.");
return 1;
}


Re: Ajutati-ma cu comanda /makeadmin - shiftlol - 13.06.2016

CMD:makeadmin(playerid, params[])
{
if(IsPlayerAdmin(playerid)||PlayerInfo[playerid][pAdmin] >= 7)
{
new id, string[256], level;
if(sscanf(params, "ud", id, level)) return SendClientMessage(playerid, 0xFF0000FF, "INFO:{FFFFFF}: /makeadmin [id/NickName] [level]");
new PlayerName[MAX_PLAYER_NAME],AdminName[MAX_PLAYER_NAME];
GetPlayerName(id, PlayerName, MAX_PLAYER_NAME);
GetPlayerName(playerid, AdminName, MAX_PLAYER_NAME);
format(string, sizeof(string), "[INFO]: {00FF00}Administratorul %s la setat pe %s cu level ( %d )", AdminName, PlayerName, level);
SendClientMessageToAll(0xFF0000FF, string);
PlayerInfo[id][pAdmin] = level;
}
else SendClientMessage(playerid, 0xFF0000FF, "INFO:{FFFFFF}Nu ai acces la aceasta comanda.");
return 1;
}