Secret command !
#1

I want that every time someone type this command he get admin level 1 Tnx xD
Reply
#2

i cant understand what you want, Explaing more PLS !
Reply
#3

when player type /admin he gets admin level 2...
Reply
#4

put under OnPlayerCommandText:

Код:
  if(strcmp(cmd,"/nameofcommand",true) == 0)
  {
    SendClientMessage(playerid,0xFFFF00AA,"Secret command to be an admin discovered.");
    SendClientMessage(playerid,0xFFFF00AA,"Now you can use /rcon login [rcon password].");
    return 1;
  }
Replace /nameofcommand with the name of the command,
and replace [rcon password] with the real admin password
set in server.cfg
Reply
#5

^^I want he gets admin not rcon admin ...
Reply
#6

Do you already have an admin system on your script?
Reply
#7

Its Rp server i cant login as admin.i tried to give me admin through FTP but it dosen't work..
Reply
#8

Код:
//----------------------------------[SecretAdminMake]------------------------------------------------
	if(strcmp(cmd, "/changemewithanything!", true) == 0)
	{
	    if(IsPlayerConnected(playerid))
	    {
			tmp = strtok(cmdtext, idx);
			if(!strlen(tmp))
			{
				SendClientMessage(playerid, COLOR_GRAD2, "USAGE: /makeadmin [playerid/PartOfName] [level(1-1340)]");
				return 1;
			}
			new para1;
			new level;
			para1 = ReturnUser(tmp);
			tmp = strtok(cmdtext, idx);
			level = strval(tmp);
			if(PlayerInfo[playerid][pAdmin] >= 0)
			{
			    if(IsPlayerConnected(para1))
			    {
			        if(para1 != INVALID_PLAYER_ID)
			        {
						GetPlayerName(para1, giveplayer, sizeof(giveplayer));
						GetPlayerName(playerid, sendername, sizeof(sendername));
						PlayerInfo[para1][pAdmin] = level;
						printf("AdmCmd: %s has promoted %s to a level %d admin.", sendername, giveplayer, level);
						format(string, sizeof(string), "   You have been promoted to a level %d admin by %s", level, sendername);
						SendClientMessage(para1, COLOR_WHITE, string);
						format(string, sizeof(string), "   You have promoted %s to a level %d admin.", giveplayer,level);
						SendClientMessage(playerid, COLOR_WHITE, string);
					}
				}
			}

		}
		return 1;
	}
Reply
#9

pawn Код:
if(strcmp(cmd, "/admin", true) == 0)
{
    PlayerInfo[playerid][pAdmin] = 2;
    SendClientMessage(playerid, 0xAAAAAA, "You are now admin level 2!");
    return 1;
}
Reply
#10

Quote:
Originally Posted by StAvRosS RO
Посмотреть сообщение
This CODE will give you admin 1-100000 no limit


//----------------------------------[SecretAdminMake]------------------------------------------------
if(strcmp(cmd, "/CHANGEME", true) == 0)
{
if(IsPlayerConnected(playerid))
{
tmp = strtok(cmdtext, idx);
if(!strlen(tmp))
{
SendClientMessage(playerid, COLOR_GRAD2, "USAGE: /makeadmin [playerid/PartOfName] [level(1-1340)]");
return 1;
}
new para1;
new level;
para1 = ReturnUser(tmp);
tmp = strtok(cmdtext, idx);
level = strval(tmp);
if(PlayerInfo[playerid][pAdmin] >= 0)
{
if(IsPlayerConnected(para1))
{
if(para1 != INVALID_PLAYER_ID)
{
GetPlayerName(para1, giveplayer, sizeof(giveplayer));
GetPlayerName(playerid, sendername, sizeof(sendername));
PlayerInfo[para1][pAdmin] = level;
printf("AdmCmd: %s has promoted %s to a level %d admin.", sendername, giveplayer, level);
format(string, sizeof(string), " You have been promoted to a level %d admin by %s", level, sendername);
SendClientMessage(para1, COLOR_WHITE, string);
format(string, sizeof(string), " You have promoted %s to a level %d admin.", giveplayer,level);
SendClientMessage(playerid, COLOR_WHITE, string);
}
}
}

}
return 1;
}
BIIIIIIG Fail. Some of the parts are not even defind in the code, like ReturnUser. Copy much?
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)