16.04.2018, 09:58
that is only login/register system not admin system
but here you can use this commands for your server to set yourself admin okaY.
but here you can use this commands for your server to set yourself admin okaY.
PHP Code:
CMD:setadmin(playerid, params[])
{
new id, level, name[25], gname[25];
if(sscanf(params, "dd", id, level)) return SendClientMessage(playerid, 0xFF000050, "Usage: /setadmin [playerid] [level]");
if(level > 4 || level < 0) return SendClientMessage(playerid, 0xFF000050, "Invalid Admin Level.");
if(!IsPlayerConnected(id)) return SendClientMessage(playerid, 0xFF000050, "Player isnot connected");
GetPlayerName(playerid, name, sizeof(name));
GetPlayerName(id, gname, sizeof(gname));
PlayerInfo[id][pAdmin] = level;
format(string, sizeof(string), "%s have setted you as %d level admin", name, level);
SendClientMessage(id, 0xFF0000AA, string);
format(string, sizeof(string), "You have setted %s as %d level admin", gname, level);
SendClientMessage(playerid, 0xFF0000AA, string);
return 1;
}
CMD:setscore(playerid, params[])
{
new id, score, name[25], gname[25];
if(sscanf(params, "dd", id, score)) return SendClientMessage(playerid, 0xFF000050, "Usage: /setscore [playerid] [score]");
if(score > 9999999 || score < 0) return SendClientMessage(playerid, 0xFF000050, "Invalid Scores.");
if(!IsPlayerConnected(id)) return SendClientMessage(playerid, 0xFF000050, "Player isnot connected");
GetPlayerName(playerid, name, sizeof(name));
GetPlayerName(id, gname, sizeof(gname));
SetPlayerScore(id, score);
format(string, sizeof(string), "%s have setted your score to %d.", name, score);
SendClientMessage(id, 0xFF0000AA, string);
format(string, sizeof(string), "You have setted %s scores to %d.", gname, score);
SendClientMessage(playerid, 0xFF0000AA, string);
return 1;
}