SA-MP Forums Archive
Problem with an allowed cmd by Admin - 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: Problem with an allowed cmd by Admin (/showthread.php?tid=369785)



Problem with an allowed cmd by Admin, (Rep+) for everyone help me - waim - 18.08.2012

Hello Guys .. I have a problem with a cmd , when the admins allowed this cmd, only these admins who can use it, Unlike players still disable to them ..

Код:
    if(strcmp("/dm", cmdtext, true) == 0)
	{
	    if(GDM_Var[playerid] == 1)return SCM(playerid,red, "ERROR: You are already in this zone.");
        if(GDM_Options[playerid] == false) return SCM(playerid,red, "ERROR: This zone is locked.");
        if(GDM_Options[playerid] == true) return GDM_Var[playerid] = 1;
        if(GDM_Options[playerid] == true) return SCM(playerid,aqua,"Welcome to the \"DeathMatchGhost\" Zone !");
        if(GDM_Options[playerid] == true) return SCM(playerid,aqua,"You Want To Exit? Type [/exdm] !");
		GDM_TeleportPlayer(playerid);
  		return true;
	}
Код:
	if(strcmp("/Enabledm", cmdtext, true) == 0)
	{
	    if(!IsPlayerAdmin(playerid)) return SCM(playerid,red,"ERROR: You are not an admin !");
	    if(GDM_Options[playerid] == true) return SCM(playerid,red, "ERROR: This zone is already opened.");
		GDM_Options[playerid] = true;
		SendClientMessageToAll(blue,"# DeathMatch Zone is opened by the admin, type [/dm] to teleport !");
		return true;
	}
I'll give a rep+ for everyone try to help me and thanks ..


Re: Problem with an allowed cmd by Admin - Avi57 - 18.08.2012

whats errors or warnings ?
Buddy explain good Please


Re : Re: Problem with an allowed cmd by Admin - waim - 18.08.2012

Quote:
Originally Posted by Avi57
Посмотреть сообщение
whats errors or warnings ?
Buddy explain good Please
No Errors, No Warnings .. When I Enabled the cmd to use, Only me who can use it, other players No, the cmd still disabled .. Sorry my bad English


Re: Problem with an allowed cmd by Admin - Avi57 - 18.08.2012

Because u did IsPlayerAdmin !
everyone is not admin dude !


Re : Problem with an allowed cmd by Admin - waim - 18.08.2012

I think u didn't understand me .. This is a Deathmatch, There are 2 cmds : /enabledm and /disabledm .. When the rcons Enabled the deathmach, the players type /dm and they got " This zone is locked " even if the Admin Enabled it .. but the Admin can go, understand ?


Re : Problem with an allowed cmd by Admin - waim - 18.08.2012

Please HELP !


Re: Problem with an allowed cmd by Admin - IceMeteor - 18.08.2012

pawn Код:
if(strcmp("/dm", cmdtext, true) == 0)
    {
        if(GDM_Var[playerid] == 1)return SCM(playerid,red, "ERROR: You are already in this zone.");
        if(GDM_Options[playerid] == false) return SCM(playerid,red, "ERROR: This zone is locked.");
        if(GDM_Options[playerid] == true)
        {
            GDM_Var[playerid] = 1;
            SCM(playerid,aqua,"Welcome to the \"DeathMatchGhost\" Zone !");
            SCM(playerid,aqua,"You Want To Exit? Type [/exdm] !");
            GDM_TeleportPlayer(playerid);
        }
        return true;
    }



Re : Problem with an allowed cmd by Admin - waim - 18.08.2012

I've already try with this code, and I'm still have the same problem


Re: Problem with an allowed cmd by Admin - IceMeteor - 18.08.2012

If you do /dm, any message like 'Welcome to the \"DeathMatchGhost\" Zone' or something like that?


Re : Problem with an allowed cmd by Admin - waim - 18.08.2012

I got : "This Zone is locked" for Players

Rcon Got Welcome and Teleport ..