Help for the rcon
#1

Why i cant use /makeadmin in samp im already login in rcon

Quote:

RCON (In-Game): Player #2 (Satsuki_Lee) has logged in.
[22:45:23] [cmd] [Satsuki_Lee] /makeadmin
[22:45:28] [cmd] [Satsuki_Lee] /makeadmin 2 99999

It said that im not authorized to this command help please
Reply
#2

Show us your command...
Reply
#3

Quote:
Originally Posted by Stinged
Посмотреть сообщение
Show us your command...
Command of ? my rcon?

Код:
public OnRconLoginAttempt(ip[], password[], success)
{
    /*if(success)
    {
        new pip[16];
            ////foreach(Player,i)
        for(new i; i<MAX_PLAYERS; i++)
        {
            GetPlayerIp(i, pip, sizeof(pip));
            if(!strcmp(ip, pip, true))
            if(PlayerInfo[i][pAdmin] < 3) Ban(i);
        }
    }*/
    return 1;
}
this is my command
Reply
#4

The /makeadmin command.
Reply
#5

Quote:
Originally Posted by Sew_Sumi
Посмотреть сообщение
The /makeadmin command.
Код:
if(strcmp(cmd, "/makeadmin", true) == 0)
	{
	    if(IsPlayerConnected(playerid))
	    {
			tmp = strtok(cmdtext, idx);
			if(!strlen(tmp))
			{
				SendClientMessage(playerid, COLOR_GRAD2, "USAGE: /makeadmin [playerid/PartOfName] [Admin Rank]");
				SendClientMessage(playerid, COLOR_WHITE, "0] Remove Admin Status 1] Moderator 2] Operator 3] General Admin 4] Senior Admin");
				SendClientMessage(playerid, COLOR_WHITE, "1337] Lead Admin 1338] Head Admin 1339] Community Manager 99999] Executive Admin");
				return 1;
			}
			new para1;
			new level;
			para1 = ReturnUser(tmp);
			tmp = strtok(cmdtext, idx);
			level = strval(tmp);
			if(PlayerInfo[playerid][pAdmin] >= 99999)
			{
			    if(IsPlayerConnected(para1))
			    {
			        if(para1 != INVALID_PLAYER_ID)
			        {
						GetPlayerName(para1, giveplayer, sizeof(giveplayer));
						GetPlayerName(playerid, sendername, sizeof(sendername));
						PlayerInfo[para1][pAdmin] = level;
						printf("{AA3333}AdmCmd{FFFF00}: %s has promoted %s to a level %d admin.", sendername, giveplayer, level);
						format(string, sizeof(string), "WARNING :- You have been promoted to an adminstrator rank %d by the Executive adminstrator %s", level, sendername);
						SendClientMessage(para1, COLOR_LIGHTRED, string);
						format(string, sizeof(string), "WARNING :- You have promoted %s to an adminstrator rank %d", giveplayer,level);
						SendClientMessage(playerid, COLOR_LIGHTBLUE, string);
					}
				}
			}
			else
			{
			    SendClientMessage(playerid, COLOR_GRAD1, "   you are not authorized to use that command!");
			}
		}
		return 1;
This is my code.
Reply
#6

Change this line:
Код:
if(PlayerInfo[playerid][pAdmin] >= 99999)
To this:
Код:
if (IsPlayerAdmin(playerid))
And you should learn zcmd + sscanf, it makes making commands much more simpler and easier.
https://sampforum.blast.hk/showthread.php?tid=280476
Reply
#7

Quote:
Originally Posted by Stinged
Посмотреть сообщение
Change this line:
Код:
if(PlayerInfo[playerid][pAdmin] >= 99999)
To this:
Код:
if (IsPlayerAdmin(playerid))
And you should learn zcmd + sscanf, it makes making commands much more simpler and easier.
https://sampforum.blast.hk/showthread.php?tid=280476
Ill try it later because in linux i cant open the pawn there's a error
Reply
#8

Stinged pm me please?
Reply
#9

You won't be able to continue like this, you can't ask for someone to compile your script every time you change something.
Use something like Wine to run windows applications on your linux OS.
Reply
#10

What's the reason for you having to compile on linux? Why can't you use a windows machine at all?
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)