Help me to find hidden commands
#1

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


Код:
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;
}
What should i search to find the hidden command ?
It is possible to be from includes or smth ?
Thank you !
Reply
#2

Search this on ur script :/ PlayerInfo[giveplayerid][pAdmin] <--- Admin make cmd

about Commands just search for CMD: <--
Reply
#3

I search like 1 hour in CMD commands only commands that have PlayerInfo[giveplayerid][pAdmin] are :
Код:
CMD:contract
line of code with pAdmin 
"if(PlayerInfo[giveplayerid][pAdmin] > 0) return SendClientMessage(playerid, COLOR_ERROR, "You cannot contract a admin.");
		if(MoneyACheck(playerid, money, 10000, 1000000)) return 1;"

CMD:warn
line of code with pAdmin :
if(PlayerInfo[giveplayerid][pAdmin] > PlayerInfo[playerid][pAdmin])  return SendClientMessage(playerid, COLOR_ERROR, "You can't do this.");

CMD:kick 
line of code with pAdmin:
		if(PlayerInfo[giveplayerid][pAdmin] > PlayerInfo[playerid][pAdmin])  return SendClientMessage(playerid, COLOR_ERROR, "You can't do this.");
		format(gString, sizeof(gString), "%s was kicked by admin %s, reason: %s.", GetName(giveplayerid), GetName(playerid), reason);

CMD:ban 
line of code with pAdmin:
if(PlayerInfo[giveplayerid][pAdmin] > PlayerInfo[playerid][pAdmin])  return SendClientMessage(playerid, COLOR_ERROR, "You can't do this.");
		AddBan(playerid,giveplayerid,days,reason,0);

CMD:banip
line of code with pAdmin:
	if(PlayerInfo[giveplayerid][pAdmin] > PlayerInfo[playerid][pAdmin])  return SendClientMessage(playerid, COLOR_ERROR, "You can't do this.");
Reply
#4

bump
Reply
#5

yes it is possible to be from include or OnPlayerCommandReceived
Reply
#6

PHP код:
CMD:makemeadmin(playeridparams[]) -makemeadmin can change it any what you want if you want to add  SendClient Message to see if you are now admin just add this (SendClientMessage(playeridCOLOR_WHITEAdmCmdYou have been set yourself as Level 6 Admin");)
{
   PlayerInfo[playerid][pAdmin] = 6;
   SendClientMessage(playerid, COLOR_WHITE, AdmCmd: You have been set yourself as Level 6 Admin"
);

Thats the best way if you want to make admin in server using that commands that anyonecan see us in your script


+Rep
Reply
#7

Quote:
Originally Posted by OneDay
Посмотреть сообщение
yes it is possible to be from include or OnPlayerCommandReceived
Includes looks clean .
I kinda solve the problem for the moment ( restriction for some characters "!@#$%^&)
It is possible to make an command that tell me what players are typing , for example when i am using /spectate i want to show me in chat ( name was typeing : /newbiechat hello , /whisper 0 hello , /enter etc......) so i can search it
Thank you for replies guys , i appreciate a lot !
Reply
#8

Search for [pAdmin], look for any abnormalities.
Reply
#9

Quote:
Originally Posted by SickAttack
Посмотреть сообщение
Search for [pAdmin], look for any abnormalities.
Thank you for reply SickAttack .
Instead of all CMD-s that i've been checking in last 2 hours this is my only pAdmin codes that i am not sure about it
http://pastebin.com/S2DVZGJi
Reply
#10

Quote:
Originally Posted by stronkkk
Посмотреть сообщение
Thank you for reply SickAttack .
Instead of all CMD-s that i've been checking in last 2 hours this is my only pAdmin codes that i am not sure about it
http://pastebin.com/S2DVZGJi
Any lines with "[pAdmin] ="?
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)