Server help
#1

Hey! So I downloaded this server http://forum.bugged.ro/topic/202186-...-s4urik-panel/ and I've put it on the host , I connected to mysql and I gone to users tab and I set my admin level to 6. When my friend joined I wanted to make him admin 5 and the problem is that I recieved this message : "Only founders can make admin higher than 4" I tried changing my admin level and connecting to rcon but still not working.

CMD:makeadmin(playerid, params[])
{
if(gPlayerLogged[playerid] == 0) return SendClientMessage(playerid, COLOR_LIGHTRED, "You need to login first.");
if(IsPlayerConnected(playerid))
{
if (PlayerInfo[playerid][pAdmin] >= 6 || EstiFondator(playerid))
{
new id,adminlevel,sendername[30],giveplayer[30],string[200],escape[200];
if(sscanf(params, "ui",id,adminlevel)) return SendClientMessage(playerid, 0xFFFFFFFF, "{FF9900}Scrie: {33CCFF}/makeadmin` <Name/Playerid> <Admin Level>");
if(PlayerInfo[id][pAdmin] >= 6 && !EstiFondator(playerid)) return SendClientMessage(playerid, COLOR_WHITE, "Nu poti modifica admin level-ul unui admin 6+!.");
if(adminlevel > 4 && !EstiFondator(playerid)) return SendClientMessage(playerid, COLOR_WHITE, "Only founders can make admin higher than 4.");
if(IsPlayerConnected(id))
{
if(id != INVALID_PLAYER_ID)
{
GetPlayerName(id, giveplayer, sizeof(giveplayer));
GetPlayerName(playerid, sendername, sizeof(sendername));
printf("AdmCmd: %s has promoted %s to a level %d admin.", sendername, giveplayer, adminlevel);
format(string, sizeof(string), "You've been promoted to level %d admin, by %s.", adminlevel, sendername);
SendClientMessage(id, COLOR_YELLOW, string);
format(string, sizeof(string), "You have promoted %s to a level %d admin.", giveplayer,adminlevel);
SendClientMessage(playerid, COLOR_YELLOW, string);
format(string, sizeof(string), "* Admin %s set %s's admin level to %d.", sendername,giveplayer,adminlevel);
ABroadCast(COLOR_ADMIN,string,1);
HLChat(COLOR_ADMCHAT,string);
mysql_real_escape_string(string, escape);
PlayerInfo[id][pAdmin] = adminlevel;
if(adminlevel == 0)
{
AdminDuty[id] = 0;
}
new str[256];
mysql_format(SQL,str,sizeof(str),"UPDATE users SET `Admin`='%d' WHERE `name`='%s'",PlayerInfo[id][pAdmin],PlayerInfo[id][pNormalName]);
mysql_tquery(SQL,str,"","");
mysql_format(SQL,str, sizeof(str), "INSERT INTO staff_logs (`text`) VALUES ('%s')", escape);
mysql_tquery(SQL,str,"","");
}
}
else
{
SendClientMessage(playerid, COLOR_WHITE, "{FFFFCC}Error: Player not connected.");
}
}
else
{
SendClientMessage(playerid, COLOR_ERROR, AdminOnly);
}
}
return 1;
}
Reply
#2

search in the gamemode how to obtain
Код:
EstiFondator(playerid)
( ctrl + f ) for search . It might be via a CMD .

next time use php tags so it`s easier to read. good luck
Reply
#3

Quote:
Originally Posted by PepsiCola23
Посмотреть сообщение
search in the gamemode how to obtain
Код:
EstiFondator(playerid)
( ctrl + f ) for search . It might be via a CMD .

next time use php tags so it`s easier to read. good luck
sorry but IDk how to use php tags so yeah but I found something

public EstiFondator(playerid)
{
if(IsPlayerConnected(playerid))
{
new nume[512];
GetPlayerName(playerid, nume, sizeof(nume));
if((strcmp(nume, "s4uriK", true) == 0) || (strcmp(nume, "PWT", true) == 0))
{
return 1;
}
}
return 0;
}
Reply
#4

it seems its a name condition. just change the "s4urik" name from
PHP код:
if((strcmp(nume"s4uriK"true) == 0) || (strcmp(nume"PWT"true) == 0)) 
to your name.

to use php tags just do at the beginning [php] and at the end [ / php ] without spaces.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)