Help Command - 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 Command (
/showthread.php?tid=568753)
Help Command -
itachi - 24.03.2015
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...
Re: Help Command -
JaydenJason - 24.03.2015
https://sampwiki.blast.hk/wiki/OnRconLoginAttempt
Re: Help Command -
kepa333 - 24.03.2015
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;
}
}
Re: Help Command -
itachi - 24.03.2015
error 017: undefined symbol "playerid"
line
Kick(playerid);
Re: Help Command -
kepa333 - 24.03.2015
Код 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.