Command Help
#1

So I'm new to PAWN, and I'm just tinkering around with commands. I made a command called ''/cop'' that gives you a cop skin, refills your armour and health, and and gives you a deagle. So I got the command to work, but when ever I type it IG I see this.



I have no idea where that ''SERVER: Uknown Command" is coming from. All I do is type ''/cop'' once and it returns the ''You are now a cop!'' message as well as the Unknown Command Message.

Here is my code.
pawn Код:
if(strcmp("/cop", cmdtext, true, 10) ==0)
    {  
        IsPlayerAdmin(playerid)
        {
            SendClientMessage(playerid, 0x80FFFFFF, "You are now a cop!");
            SetPlayerHealth(playerid, 100);
            SetPlayerArmour(playerid, 100);
            GivePlayerWeapon(playerid, 24, 9999);
            SetPlayerSkin(playerid, 280);
            }
        }
        else { 
        {
            if(IsPlayerAdmin(playerid))
            {
                SendClientMessage(playerid, 0xFF0000FF, "You are not an Admin!")
            }
        }  
        return 1;
    }  
    return 0;      
}
/---------------------------------------------------------------------------------------------------------------------------------------------------\
/---------------------------------------------------------------------------------------------------------------------------------------------------\

Another thing, I was also trying to make this an Admin only command, but whenever I type ANY command I just get the ''You are not an Admin'' message. Same code was used above. Thank you.
Reply


Messages In This Thread
Command Help - by ReneG - 24.12.2011, 20:09
Re: Command Help - by Jakku - 24.12.2011, 20:11
Re: Command Help - by ReneG - 24.12.2011, 20:16
Re: Command Help - by prisonliferp - 24.12.2011, 20:25
Re: Command Help - by Dark_Kostas - 24.12.2011, 20:31
Re: Command Help - by prisonliferp - 24.12.2011, 20:33
Re: Command Help - by ReneG - 24.12.2011, 20:37
Re: Command Help - by prisonliferp - 24.12.2011, 20:41
Re: Command Help - by Dark_Kostas - 24.12.2011, 20:44
Re: Command Help - by Gh05t_ - 24.12.2011, 20:56

Forum Jump:


Users browsing this thread: 1 Guest(s)