Only for admin level 9
#1

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
Reply
#2

Show us your "admin" variable.
Reply
#3

what you mean?
Reply
#4

We need to know the "admin" variable

such as "pAdmin"
Reply
#5

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.
Reply
#6

LuxAdmin
Reply
#7

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.
Reply
#8

Код:
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
Reply
#9

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;
     }

Reply
#10

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..
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)