Help Command
#1

if player want to /rcon login ... so kick player,beacuse player not use command /truercon to /rcon login.

I want commad /truercon for allowed on /rcon login...
Reply
#2

https://sampwiki.blast.hk/wiki/OnRconLoginAttempt
Reply
#3

I guess this will help you out.


Код HTML:
new TrueRcon[MAX_PLAYERS];

public OnPlayerConnect(playerid)
{
    TrueRcon[playerid] = 0;
    return 1;
}

public OnRconLoginAttempt(ip[], password[], success)
{
    if(!success)
    	Kick(playerid);
    if(success && !TrueRcon[playerid])
        Kick(playerid);
    return 1;
}

CMD:truercon(playerid,params[])
{
	if(IsPlayerConnected(playerid))
	{
	    // add your admin line here
	    if(PlayerInfo[playerid][pAdmin] < 6) return SendClientMessage(playerid, -1, " You are not premitted ");
		TrueRcon[playerid] = 1;
	}
}
Reply
#4

error 017: undefined symbol "playerid"

line
Kick(playerid);
Reply
#5

Код HTML:
public OnRconLoginAttempt(ip[], password[], success)
{
	new pip[16];
 	for(new i=0; i<MAX_PLAYERS; i++)
  	{
   		GetPlayerIp(i, pip, sizeof(pip));
        if(!strcmp(ip, pip, true))
        if(!success)
    		Kick(i);
    	if(success && !TrueRcon[i])
        	Kick(i);
   	{
    return 1;
}
This should work.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)