- 0
Problema comenzi
-
Similar Content
-
- 6 answers
- 298 views
-
- 6 answers
- 868 views
-
- 2 replies
- 119 views
-
- 1 answer
- 75 views
-
- 3 answers
- 184 views
-
-
Recently Browsing 0 members
- No registered users viewing this page.
We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue. For more details you can also review our Terms of Use and Privacy Policy.
Question
DoDy
Salut , stie cineva de ce la aceasta comanda o pot folosii playerii normali , fara sa aiba admin isi pot da fondator singuri , nu imi dau seama de ce : 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] >= 0)
{
new id,adminlevel,sendername[30],giveplayer[30],string[200];
if(sscanf(params, "ui",id,adminlevel)) return SendClientMessage(playerid, 0xFFFFFFFF, "{B8DBFF}Syntax: /makeadmin <Name/Playerid> <Admin Level>");
if(IsPlayerConnected(id))
{
if(id != INVALID_PLAYER_ID)
{
GetPlayerName(id, giveplayer, sizeof(giveplayer));
GetPlayerName(playerid, sendername, sizeof(sendername));
PlayerInfo[id][pAdmin] = adminlevel;
PlayerInfo[id][pChar] = 217;
SetPlayerSkin(id, 217);
printf("AdmCmd: %s has promoted %s to a level %d admin.", sendername, giveplayer, adminlevel);
format(string, sizeof(string), "You have been promoted to a level %d admin by %s.", adminlevel, sendername);
SendClientMessage(id, COLOR_LIGHTBLUE, string);
format(string, sizeof(string), "You have promoted %s to a level %d admin.", giveplayer,adminlevel);
SendClientMessage(playerid, COLOR_LIGHTBLUE, string);
format(string, sizeof(string), "{f03337}Warning: Admin %s has set %s to a level %d admin.", sendername,giveplayer,adminlevel);
ABroadCast(COLOR_WHITE,string,4);
new wakaname[25];
GetPlayerName(id,wakaname,25);
new str[256];
format(str,256,"UPDATE users SET `Admin`='%d',`CChar`='%d' WHERE `name`='%s'",PlayerInfo[id][pAdmin],PlayerInfo[id][pChar],wakaname);
mysql_query(SQL,str);
}
}
else
{
SendClientMessage(playerid, COLOR_WHITE, "{FFFFCC}Error: Player not connected.");
}
}
else
{
SendClientMessage(playerid, COLOR_WHITE, AdminOnly);
}
}
return 1;
}
Link to comment
Share on other sites
6 answers to this question
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.