Command Help
#4

Код:
if(strcmp("/cop", cmdtext, true, 10) ==0)
{
        if (IsPlayerAdmin(playerid))
        {
            SendClientMessage(playerid, 0x80FFFFFF, "You are now a cop!");
            SetPlayerHealth(playerid, 100);
            SetPlayerArmour(playerid, 100);
            GivePlayerWeapon(playerid, 24, 9999);
            SetPlayerSkin(playerid, 280);
        }
        else
        {
            SendClientMessage(playerid, 0xFF0000FF, "You are not an Admin!")
            return 0;
        }
    return 1;
}
-Not pretty sure, try it out? :3

The return 0; makes sure that it doesn't give something back such as "Unknown command" -I think?

+Rep if I helped out :3
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: 6 Guest(s)