How to Make /rules cmd and other Cmds
#8

Quote:
Originally Posted by caribe88
Посмотреть сообщение
public OnPlayerCommandText(playerid, cmdtext[])
{
if (strcmp("/rules", cmdtext, true, 10) == 0)
{
SendCilentMessage(playerid, AnyColor, "1.No teamKilling");
SendCilentMessage(playerid, AnyColor, "2.Other Rules");
SendCilentMessage(playerid, AnyColor, "3.Other Rules");
SendCilentMessage(playerid, AnyColor, "4.Other Rules");
return 1;
}
return 0;
}

*By anycolor you have to define a color usualy for rules people use yellow but its your choice
Here is a list of somoe colors
#define COLOR_BLUE 0x375FFFFF
#define COLOR_GREY 0xAFAFAFAA
#define COLOR_GREEN 0x33AA33AA
#define COLOR_RED 0xAA3333AA
#define COLOR_YELLOW 0xFFFF00AA
#define COLOR_MEDBLUE 0x0091FFFF
Quote:
Originally Posted by Littlehelper[MDZ]
Посмотреть сообщение
Код:
if(strcmp("/rules",cmdtext,true, 10) == 0)
{
SendClientMessage(playerid,-1,"Put Your Message Here");
SendClientMessage(playerid,-1,"Put Your Message Here");
SendClientMessage(playerid,-1,"Put Your Message Here");
SendClientMessage(playerid,-1,"Put Your Message Here");
return 1;
}
I recommend ZCMD, Since its the fastest command processor.
Guys, /rules are 6 Characters not 10.
@ [Cali]ChrOnic_T
pawn Код:
public OnPlayerCommandText( playerid, cmdtext[ ] )
{
    if( !strcmp( cmdtext, "/rules", true ) )
    {
        SendClientMessage( playerid, -1, "My first rule!");
        return 1;
    }
    // Rest of Commands.
    return 0;
}
By the way I suggest you to read some tutorials on how to use zcmd because it's better than strcmp.
All you have to do is:
pawn Код:
CMD:rules( playerid, params[ ] )
{
    SendClientMessage( playerid, -1, "My first rule!");
    return 1;
}
Reply


Messages In This Thread
How to Make /rules cmd and other Cmds - by [Cali]ChrOnic_T - 16.02.2012, 13:38
Re: How to Make /rules cmd and other Cmds - by BleverCastard - 16.02.2012, 13:40
Re: How to Make /rules cmd and other Cmds - by Littlehelper - 16.02.2012, 13:41
Re: How to Make /rules cmd and other Cmds - by emokidx - 16.02.2012, 13:41
Re: How to Make /rules cmd and other Cmds - by caribe88 - 16.02.2012, 13:42
Re: How to Make /rules cmd and other Cmds - by doreto - 16.02.2012, 13:43
Re: How to Make /rules cmd and other Cmds - by Slash_ - 16.02.2012, 13:45
Re: How to Make /rules cmd and other Cmds - by Konstantinos - 16.02.2012, 13:56

Forum Jump:


Users browsing this thread: 3 Guest(s)