13.06.2016, 13:13
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;
}
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;
}