/commands cmd
#8

This is a better way to do the command though, it looks nicer...

PHP код:
CMD:acmds(playeridparams[])
{
    if(!
IsPlayerAdmin(playerid))
        return 
SendClientMessage(playerid, -1"SERVER: Unknown command."); 
    
SendClientMessage(playeridCOLOR"Message");
    return 
1;

Remember to include the exclamation mark (!), that means IS NOT or DOES NOT, so it is saying "IF playerid IS NOT admin RETURN SendClientMessage..." else if a player is an admin it will send the commands.

It's a personal preference, both work equally as well.
Reply


Messages In This Thread
/commands cmd - by saffierr - 23.08.2015, 00:53
Re: /commands cmd - by ghost556 - 23.08.2015, 00:57
Re: /commands cmd - by Luke_James - 23.08.2015, 01:20
Re: /commands cmd - by saffierr - 23.08.2015, 01:22
Re: /commands cmd - by rymax99 - 23.08.2015, 01:23
Re: /commands cmd - by Luke_James - 23.08.2015, 01:37
Re: /commands cmd - by saffierr - 23.08.2015, 01:46
Re: /commands cmd - by Luke_James - 23.08.2015, 02:26
Re: /commands cmd - by Roberto80 - 23.08.2015, 08:19
Re: /commands cmd - by Cookland - 23.08.2015, 10:49

Forum Jump:


Users browsing this thread: 1 Guest(s)