SA-MP Forums Archive
Help for the rcon - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: Help for the rcon (/showthread.php?tid=609126)



Help for the rcon - VinHanako - 09.06.2016

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


Re: Help for the rcon - Stinged - 09.06.2016

Show us your command...


Re: Help for the rcon - VinHanako - 09.06.2016

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


Re: Help for the rcon - Sew_Sumi - 09.06.2016

The /makeadmin command.


Re: Help for the rcon - VinHanako - 09.06.2016

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.


Re: Help for the rcon - Stinged - 09.06.2016

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


Re: Help for the rcon - VinHanako - 09.06.2016

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


Re: Help for the rcon - VinHanako - 09.06.2016

Stinged pm me please?


Re: Help for the rcon - Stinged - 09.06.2016

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.


Re: Help for the rcon - Sew_Sumi - 09.06.2016

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