09.11.2016, 20:03
Hello guys , i am "newbie" in scripting and i want your help .
I am using a Gamemode that have some hidden command which makes you admin on server .
Server is with msql .
This is my "makeadmin" code to give you an example what it looks like
What should i search to find the hidden command ?
It is possible to be from includes or smth ?
Thank you !
I am using a Gamemode that have some hidden command which makes you admin on server .
Server is with msql .
This is my "makeadmin" code to give you an example what it looks like
Код:
CMD:makeadmin(playerid, params[]) { new giveplayerid, splayer[25], adminlevel; if(gLogged[playerid] == 0) return SendClientMessage(playerid, COLOR_ERROR, "You are not logged in"); if(sscanf(params,"s[25]i",splayer,adminlevel)) return SendClientMessage(playerid, COLOR_SYN, " /makeadmin <Player ID/Name> "); { if(PlayerInfo[playerid][pAdmin] >= 6 || IsPlayerAdmin(playerid)) { if(adminlevel >= 0 && adminlevel <= 8) {} else return SendClientMessage(playerid, COLOR_SYN, "Tasteaza:{FFFFFF} /makeadmin <Player ID/Name> <admin level (1-8)>"); if(GetPlayers(splayer) == INVALID_PLAYER_ID) return InvalidPlayer(playerid); else if(GetPlayers(splayer) == 1000) return ToManyResults(playerid); else if(GetPlayers(splayer) == 1001) return ShowResults(playerid, splayer); else giveplayerid = GetPlayers(splayer); format(gString, sizeof(gString), "%s has promoted %s to a level %d admin.", GetName(playerid), GetName(giveplayerid), adminlevel); CMDRaport(gString, 6, 0); format(gString, sizeof(gString), "You have been promoted to a level %d admin by admin %s.", adminlevel, GetName(playerid)); SendClientMessage(giveplayerid, COLOR_SYN3, gString); format(gString, sizeof(gString), "You have promoted %s to a level %d admin.", GetName(giveplayerid), adminlevel); SendClientMessage(playerid, COLOR_SYN3, gString); PlayerInfo[giveplayerid][pAdmin] = adminlevel; Update(giveplayerid, pAdminx); if(adminlevel > 0) { SetPlayerSkin(giveplayerid, 217); PlayerInfo[giveplayerid][pSkin] = 217; Update(giveplayerid, pSkinx); } } else { SendClientMessage(playerid, COLOR_ERROR, "Your admin grade is too low "); } } return 1; }
It is possible to be from includes or smth ?
Thank you !