SA-MP Forums Archive
[FilterScript] RomAdmin - Fast, Efficient, Admin/VIP System [30+ commands] [AntiAd, AntiSpam, Irc and much more] - 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: Filterscripts (https://sampforum.blast.hk/forumdisplay.php?fid=17)
+--- Thread: [FilterScript] RomAdmin - Fast, Efficient, Admin/VIP System [30+ commands] [AntiAd, AntiSpam, Irc and much more] (/showthread.php?tid=376177)

Pages: 1 2 3


Re: RomAdmin - Fast, Efficient, Admin/VIP System [30+ commands] [AntiAd, AntiSpam, Irc and much more] - JaKe Elite - 14.10.2012

The Rcon Control Panel version of RomAdmin would be release this month.

But in different thread.


Re: RomAdmin - Fast, Efficient, Admin/VIP System [30+ commands] [AntiAd, AntiSpam, Irc and much more] - Uberanwar - 14.10.2012

Romel, can you tell me how to make the RomAdmin register/login system appears after a player is spawned?


Re: RomAdmin - Fast, Efficient, Admin/VIP System [30+ commands] [AntiAd, AntiSpam, Irc and much more] - JaKe Elite - 14.10.2012

You have to remove this line

from OnPlayerConnect

PHP Code:
if(fexist(Path(playerid)))
{
    if(
ServerInfo[AutoLog] == 1)
    {
        if((!
strcmp(ipPlayerAcc[playerid][Ip], true)) && (ServerInfo[AutoLog] == 1))
        {
            
INI_ParseFile(Path(playerid),"loadaccount_user", .bExtra true, .extra playerid);
            if(
ServerInfo[ScoreSaving] == 1)
            {
                
SetPlayerScore(playeridPlayerAcc[playerid][Score]);
            }
            
GivePlayerMoney(playeridPlayerAcc[playerid][Money]);
            
SendClientMessage(playeridCOLOR_YELLOW"Success: You've automatically successfully login to your account");
            
PlayerAcc[playerid][Log] = 1;
            return 
1;
        }
    }
    
ShowPlayerDialog(playeridLOGINDIALOG_STYLE_PASSWORD""white"RomAdmin - Login""Welcome Back,\nPlease login first by\nPutting your password below""Login""Exit");
}
else
{
    
ShowPlayerDialog(playeridREGISTERDIALOG_STYLE_PASSWORD""white"RomAdmin - Register""Welcome to the Server,\nPlease register first by\nPutting your password below""Register""Exit");

Now after removing that do this

PHP Code:
new bool:HasIt[MAX_PLAYERS];
public 
OnPlayerConnect(playerid)
{
    
HasIt[playerid] = false;
    return 
1;
}
public 
OnPlayerDisconnect(playeridreason)
{
    
HasIt[playerid] = false;
    return 
1;
}
public 
OnPlayerSpawn(playerid)
{
    if(
HasIt[playerid] == false)
    {
        
HasIt[playerid] = true;
        if(
fexist(Path(playerid)))
        {
            if(
ServerInfo[AutoLog] == 1)
            {
                if((!
strcmp(ipPlayerAcc[playerid][Ip], true)) && (ServerInfo[AutoLog] == 1))
                {
                    
INI_ParseFile(Path(playerid),"loadaccount_user", .bExtra true, .extra playerid);
                    if(
ServerInfo[ScoreSaving] == 1)
                    {
                        
SetPlayerScore(playeridPlayerAcc[playerid][Score]);
                    }
                    
GivePlayerMoney(playeridPlayerAcc[playerid][Money]);
                    
SendClientMessage(playeridCOLOR_YELLOW"Success: You've automatically successfully login to your account");
                    
PlayerAcc[playerid][Log] = 1;
                    return 
1;
                }
            }
            
ShowPlayerDialog(playeridLOGINDIALOG_STYLE_PASSWORD""white"RomAdmin - Login""Welcome Back,\nPlease login first by\nPutting your password below""Login""Exit");
        }
        else
        {
            
ShowPlayerDialog(playeridREGISTERDIALOG_STYLE_PASSWORD""white"RomAdmin - Register""Welcome to the Server,\nPlease register first by\nPutting your password below""Register""Exit");
        }
    }
    return 
1;




Re: RomAdmin - Fast, Efficient, Admin/VIP System [30+ commands] [AntiAd, AntiSpam, Irc and much more] - Uberanwar - 14.10.2012

C:\Users\sofie's\Desktop\SKCNRV3\filterscripts\Rom Admin.pwn(1173) : warning 204: symbol is assigned a value that is never used: "str2"
C:\Users\sofie's\Desktop\SKCNRV3\filterscripts\Rom Admin.pwn(1390) : error 017: undefined symbol "ip"
C:\Users\sofie's\Desktop\SKCNRV3\filterscripts\Rom Admin.pwn(6140) : warning 203: symbol is never used: "Forbidden"
C:\Users\sofie's\Desktop\SKCNRV3\filterscripts\Rom Admin.pwn(6140) : warning 203: symbol is never used: "Name"
C:\Users\sofie's\Desktop\SKCNRV3\filterscripts\Rom Admin.pwn(6140) : warning 203: symbol is never used: "botIDs"
Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase


1 Error.


the error comes from this line : if((!strcmp(ip, PlayerAcc[playerid][Ip], true)) && (ServerInfo[AutoLog] == 1))


Re: RomAdmin - Fast, Efficient, Admin/VIP System [30+ commands] [AntiAd, AntiSpam, Irc and much more] - Uberanwar - 14.10.2012

Quote:
Code:
public OnPlayerSpawn(playerid)
{
	#if VipTag == true
		if(PlayerAcc[playerid][Vip] >= 1)
		{
		    new Text3D:VIPtag = Create3DTextLabel("VIP", COLOR_ORANGE, 30.0, 40.0, 50.0, 40.0, 0);
			Attach3DTextLabelToPlayer(VIPtag, playerid, 0.0, 0.0, 0.7);
			SetPlayerColor(playerid, COLOR_ORANGE);
		}
	#endif
	if(PlayerAcc[playerid][UseSkin] == 1)
	{
		SetPlayerSkin(playerid, PlayerAcc[playerid][SaveSkin]);
		SendClientMessage(playerid, COLOR_LIME, "Saved Skin successfully loaded!");
    	SendClientMessage(playerid, COLOR_RED, "RomAdmin: /dontuseskin to disable using your save skin!");
	}
    if(IsSpecing[playerid] == 1)
    {
        SetPlayerPos(playerid, SpecX[playerid], SpecY[playerid], SpecZ[playerid]);
        SetPlayerInterior(playerid, Inter[playerid]);
        SetPlayerVirtualWorld(playerid, vWorld[playerid]);
        IsSpecing[playerid] = 0;
        IsBeingSpeced[spectatorid[playerid]] = 0;
    }
	if(PlayerAcc[playerid][Jail] == 1)
	{
		ResetPlayerWeapons(playerid);
		SetPlayerPos(playerid, 197.6661,173.8179,1003.0234);
		SetPlayerInterior(playerid, 3);
		SendClientMessage(playerid, COLOR_RED, "You've been bought back to jail, You've not finish your punishment yet!");
	}
	if(PlayerAcc[playerid][Mute] == 1)
	{
		MuteTimer[playerid] = SetTimerEx("OnPlayerUnmute", PlayerAcc[playerid][MuteTime], false, "d", playerid);
		SendClientMessage(playerid, COLOR_RED, "You've been muted, You've not finish your punishment");
	}
    if(HasIt[playerid] == false)
    {
        HasIt[playerid] = true;
        if(fexist(Path(playerid)))
        {
            if(ServerInfo[AutoLog] == 1)
            {
                if((!strcmp(ip, PlayerAcc[playerid][Ip], true)) && (ServerInfo[AutoLog] == 1))
                {
                    INI_ParseFile(Path(playerid),"loadaccount_user", .bExtra = true, .extra = playerid);
                    if(ServerInfo[ScoreSaving] == 1)
                    {
                        SetPlayerScore(playerid, PlayerAcc[playerid][Score]);
                    }
                    GivePlayerMoney(playerid, PlayerAcc[playerid][Money]);
                    SendClientMessage(playerid, COLOR_YELLOW, "Success: You've automatically successfully login to your account");
                    PlayerAcc[playerid][Log] = 1;
                    return 1;
                }
            }
            ShowPlayerDialog(playerid, LOGIN, DIALOG_STYLE_PASSWORD, ""white"RomAdmin - Login", "Welcome Back,\nPlease login first by\nPutting your password below", "Login", "Exit");
        }
        else
        {
            ShowPlayerDialog(playerid, REGISTER, DIALOG_STYLE_PASSWORD, ""white"RomAdmin - Register", "Welcome to the Server,\nPlease register first by\nPutting your password below", "Register", "Exit");
        }

    }
    return 1;
}
^ My code


Re: RomAdmin - Fast, Efficient, Admin/VIP System [30+ commands] [AntiAd, AntiSpam, Irc and much more] - JaKe Elite - 14.10.2012

Quote:
Originally Posted by Uberanwar
View Post
C:\Users\sofie's\Desktop\SKCNRV3\filterscripts\Rom Admin.pwn(1173) : warning 204: symbol is assigned a value that is never used: "str2"
C:\Users\sofie's\Desktop\SKCNRV3\filterscripts\Rom Admin.pwn(1390) : error 017: undefined symbol "ip"
C:\Users\sofie's\Desktop\SKCNRV3\filterscripts\Rom Admin.pwn(6140) : warning 203: symbol is never used: "Forbidden"
C:\Users\sofie's\Desktop\SKCNRV3\filterscripts\Rom Admin.pwn(6140) : warning 203: symbol is never used: "Name"
C:\Users\sofie's\Desktop\SKCNRV3\filterscripts\Rom Admin.pwn(6140) : warning 203: symbol is never used: "botIDs"
Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase


1 Error.


the error comes from this line : if((!strcmp(ip, PlayerAcc[playerid][Ip], true)) && (ServerInfo[AutoLog] == 1))
ooppss forgot the left variables in the OnPlayerConnect move this

PHP Code:
new ip[16]; 
to

OnPlayerSpawn,

I Don't Know, why you having these errors did you mess up the RomAdmin?
Seems like i don't having these errors/warning while compiling.


Re: RomAdmin - Fast, Efficient, Admin/VIP System [30+ commands] [AntiAd, AntiSpam, Irc and much more] - Uberanwar - 14.10.2012

Thank you. I'll try it if it works


Re: RomAdmin - Fast, Efficient, Admin/VIP System [30+ commands] [AntiAd, AntiSpam, Irc and much more] - JaKe Elite - 14.10.2012

oh forgot after adding

PHP Code:
new ip[16]; 
you have to

PHP Code:
GetPlayerIp(playeridipsizeof(ip)); 
put it below the

PHP Code:
new ip[16]; 



Re: RomAdmin - Fast, Efficient, Admin/VIP System [30+ commands] [AntiAd, AntiSpam, Irc and much more] - Uberanwar - 14.10.2012

It works, thank you the command works but a "Invalid command..blablalblab" text appears (i think it conflicts my gamemode)


Re: RomAdmin - Fast, Efficient, Admin/VIP System [30+ commands] [AntiAd, AntiSpam, Irc and much more] - JaKe Elite - 14.10.2012

Quote:
Originally Posted by Uberanwar
View Post
It works, thank you the command works but a "Invalid command..blablalblab" text appears (i think it conflicts my gamemode)
Yes that's the problem.

You have to remove the return OnPlayerCommandPerformed to stop conflicting with your gamemode.

But if still happens like if you type /admins it says unknown command then your gamemode is conflicting with my RomAdmin.

Quote:
Originally Posted by Cobra_79
View Post
Oh..well explained and perfectly designed FS.
Thanks..

Anyway
Everyone who has having problem with unknown command from your own gamemode.

Remove the return OnPlayerCommandPerformed.

If it still says unknown command like if you type /admins,
Then your gamemode is conflicting with my script.

Still i don't have details about this problem.


Re: RomAdmin - Fast, Efficient, Admin/VIP System [30+ commands] [AntiAd, AntiSpam, Irc and much more] - [RESL]AngeL - 10.11.2012

This is something like a LuxAdmin or LAdmin?Anyway I apreciate your work!