SA-MP Forums Archive
Only for admin level 9 - 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: Only for admin level 9 (/showthread.php?tid=298333)



Only for admin level 9 - DexToxz - 20.11.2011

hey there!
can you please made this Commands only for admins level 9 and 10?
Quote:

if (strcmp("/opengate", cmdtext, true, 10) == 0)
{
MoveObject(gate,1627.48156738,641.35876465,5.56952 858, 3.0);
GameTextForPlayer(playerid, "~w~Gate opened, Welcome", 5000, 5);
return 1;
}
if (strcmp("/closegate", cmdtext, true, 10) == 0)
{
MoveObject(gate,1627.47692871,641.25878906,13.8192 3294, 3.0);
GameTextForPlayer(playerid, "~w~Gate close, Goodbye", 5000, 5);
return 1;
}

Thanks alot


Re: Only for admin level 9 - SmiT - 20.11.2011

Show us your "admin" variable.


Re: Only for admin level 9 - DexToxz - 20.11.2011

what you mean?


Re: Only for admin level 9 - Joshb93 - 20.11.2011

We need to know the "admin" variable

such as "pAdmin"


Re: Only for admin level 9 - SmiT - 20.11.2011

You've just told us to make those 2 commands only for admin level 9 and 10, how could we now what's your admin variable? - an example would be the "pAdmin" from godfather mode.


Re: Only for admin level 9 - DexToxz - 20.11.2011

LuxAdmin


Re: Only for admin level 9 - Joshb93 - 20.11.2011

Quote:
Originally Posted by SmiT
Посмотреть сообщение
You've just told us to make those 2 commands only for admin level 9 and 10, how could we now what's your admin variable? - an example would be the "pAdmin" from godfather mode.
I beat you to it.

---------------------------------------------

An easy way to find out the variable, is to search an admin command, for example, "/slap"
then, you should see something like if(PlayerInfo[playerid][AdminVariableHere] ...

Whatever word is right there, where ive highlighted in red, is your admin variable.

Please find that, and let us know.


Re: Only for admin level 9 - Joshb93 - 20.11.2011

Код:
if (strcmp("/opengate", cmdtext, true, 10) == 0)
{
   if(AccInfo[playerid][Level] == 9 || AccInfo[playerid][Level] == 10)
   {
      MoveObject(gate,1627.48156738,641.35876465,5.56952 858, 3.0);
      GameTextForPlayer(playerid, "~w~Gate opened, Welcome", 5000, 5);
      return 1;
   }
   else
   {
      SendClientMessage(playerid, COLOR_HERE, "You are not allowed to use this commmand!");
      return 1;
   }
}
if (strcmp("/closegate", cmdtext, true, 10) == 0)
{
   if(AccInfo[playerid][Level] == 9 || AccInfo[playerid][Level] == 10)
  {
       MoveObject(gate,1627.47692871,641.25878906,13.8192 3294, 3.0);
       GameTextForPlayer(playerid, "~w~Gate close, Goodbye", 5000, 5);
       return 1;
   }
   else
   {
      SendClientMessage(playerid, COLOR_HERE, "You are not allowed to use this commmand!");
      return 1;
   }
}
where i highlighted COLOR_HERE, you need to change that to a color.. any color that you want


Re: Only for admin level 9 - =WoR=G4M3Ov3r - 20.11.2011

PHP код:
if (strcmp("/opengate"cmdtexttrue10) == 0)
{
  if(
AccInfo[playerid][Level] >= )
    {
            
MoveObject(gate,1627.48156738,641.35876465,5.56952 8583.0);
            
GameTextForPlayer(playerid"~w~Gate opened, Welcome"50005);
            return 
1;
        }
}
if (
strcmp("/closegate"cmdtexttrue10) == 0)
{
     if(
AccInfo[playerid][Level] >= )
     {
           
MoveObject(gate,1627.47692871,641.25878906,13.8192 32943.0);
           
GameTextForPlayer(playerid"~w~Gate close, Goodbye"50005);
           return 
1;
     }




Re: Only for admin level 9 - Joshb93 - 20.11.2011

Quote:
Originally Posted by =WoR=G4M3Ov3r
Посмотреть сообщение
PHP код:
if (strcmp("/opengate"cmdtexttrue10) == 0)
{
  if(
AccInfo[playerid][Level] >= )
    {
MoveObject(gate,1627.48156738,641.35876465,5.56952 8583.0);
GameTextForPlayer(playerid"~w~Gate opened, Welcome"50005);
return 
1;
}
if (
strcmp("/closegate"cmdtexttrue10) == 0)
{
[
COLOR="Red"]if(AccInfo[playerid][Level] >= )
    {
MoveObject(gate,1627.47692871,641.25878906,13.8192 32943.0);
GameTextForPlayer(playerid"~w~Gate close, Goodbye"50005);
return 
1;[/COLOR]

You have a missing bracket there bud..