[URGENT] problem with command
#1

Hi ladies and gentlemen, I have this little CMD on my SV but there is a problem, players can use it even of they aren't logged as admins. Here is the code:
pawn Код:
CMD:adminhouse(playerid, params[])
    {
    if(IsPlayerAdmin(playerid))
    SetPlayerHealth(playerid, 100.00);
    SetPlayerPos(playerid,-687.9445,953.5914,12.1495);
    return 1;
    }
Please help me with this is really important. Thank you.
Reply
#2

pawn Код:
CMD:adminhouse(playerid, params[])
    {
         if(IsPlayerAdmin(playerid))
         {
               SetPlayerHealth(playerid, 100.00);
               SetPlayerPos(playerid,-687.9445,953.5914,12.1495);
         }
         return 1;
    }
Reply
#3

pawn Код:
CMD:adminhouse(playerid, params[])
    {
    if(IsPlayerAdmin(playerid)) return SendClientMessage(playerid, -1, "You are not an admin");
               {
                 SetPlayerHealth(playerid, 100.00);
                 SetPlayerPos(playerid,-687.9445,953.5914,12.1495);
               }
    return 1;
    }
Try this
Reply
#4

by admin you mean, rcon administrators, or your admin system
Reply
#5

Quote:
Originally Posted by Naruto_Emilio
Посмотреть сообщение
by admin you mean, rcon administrators, or your admin system
Yes rcon administrator.


Quote:
Originally Posted by Strier
Посмотреть сообщение
pawn Код:
CMD:adminhouse(playerid, params[])
    {
    if(IsPlayerAdmin(playerid)) return SendClientMessage(playerid, -1, "You are not an admin");
               {
                 SetPlayerHealth(playerid, 100.00);
                 SetPlayerPos(playerid,-687.9445,953.5914,12.1495);
               }
    return 1;
    }
Try this
Did not work.
Reply
#6

pawn Код:
CMD:adminhouse(playerid, params[])
{
    if(IsPlayerAdmin(playerid))
    {
        SetPlayerHealth(playerid, 100.00);
        SetPlayerPos(playerid,-687.9445,953.5914,12.1495);
    }
    else
    {
        SendClientMessage(playerid, -1, "You are unable to use this command [Rcon Administrators Only!].");
    }
    return 1;
}
Reply
#7

pawn Код:
CMD:adminhouse(playerid, params[])
    {
         if(IsPlayerAdmin(playerid))
         {
               SetPlayerHealth(playerid, 100.00);
               SetPlayerPos(playerid,-687.9445,953.5914,12.1495);
         }
         else
         {
               SendClientMessage(playerid, COLOR_GREY, "You're not an Admin!");
         }
         return 1;
    }
Reply
#8

PHP код:
CMD:adminhouse(playeridparams[])
{
    if(
IsPlayerAdmin(playerid))
    {
        
SetPlayerHealth(playerid100.00);
        
SetPlayerPos(playerid,-687.9445,953.5914,12.1495);
        
SendClientMessage(playerid, -1"You have been teleported to admin's house.");
    }
    else
    {
        
SendClientMessage(playerid, -1"ERROR, You're not a RCON Administrator to use this command");
    }
    return 
1;

Reply
#9

Quote:
Originally Posted by Naruto_Emilio
Посмотреть сообщение
pawn Код:
CMD:adminhouse(playerid, params[])
{
    if(IsPlayerAdmin(playerid))
    {
        SetPlayerHealth(playerid, 100.00);
        SetPlayerPos(playerid,-687.9445,953.5914,12.1495);
    }
    else
    {
        SendClientMessage(playerid, -1, "You are unable to use this command [Rcon Administrators Only!].");
    }
    return 1;
}
Yes! WORKING! Thank you men! and thanks to everyone who answered.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)