06.05.2012, 00:55
Hey
i am gonna show how to make a simple command will its SIMPLE
should be like that NOTE! the colors use in a line like SendClientMessage(playerid, 0x0000FFAA, "YOUR TEXT");
i use color blue "#define BLUE 0x0000FFAA" Now i will tell in more detail
if (strcmp("/mycommand", cmdtext, true, 10) == 0) that is a command like /help , /credits , /cmds , /teles any of those commands
Where says
you can put any of these one you need
Now SendClientMessageToAll()
will its just like really geting banned pretty funny
Hope the tut helped
Wont be the best tut :/
Secound Tut first one wasnt good hope i done better
By SwiftKidZ
i am gonna show how to make a simple command will its SIMPLE
Code:
#define BLUE 0x0000FFAA #define PINK 0xFF66FFAA #define BLACK 0x000000AA #define AQUA 0x7CFC00AA #define LIGHTBLUE 0x00BFFFAA #define YELLOW 0xFFFF00AA #define WHITE 0xFFFFFFAA #define WHITEP 0xFFFFD5AA #define GREY 0xAFAFAFAA #define RED 0xFF0606AA #define CYAN 0x99FFFFAA #define GREEN 0x21DD00FF #define ORANGE 0xF97804AA #define PURPLE 0x9900FFAA #define ADMIN_RED 0xFB0000FF #define LIGHTGREEN 0x38FF06FF #define COLOR_LIMEGREEN 0x32CD32FF public OnPlayerCommandText(playerid, cmdtext[]) { if (strcmp("/mycommand", cmdtext, true, 10) == 0) { // Do something here return 1; } return 0;
i use color blue "#define BLUE 0x0000FFAA" Now i will tell in more detail
Code:
if (strcmp("/mycommand", cmdtext, true, 10) == 0)
Code:
f (strcmp("/mycommand", cmdtext, true, 10) == 0) { // Do something here return 1; }
Code:
//Do something here
Code:
SendClientMessage(playerid, COLOR,"this will just send client message to the player used for f (strcmp("/COMMAND HERE", cmdtext, true, 10) == 0) { SendClientMessage(playerid, COLOR,"this what slinet message used for will only send the player the message"); return 1; }
Code:
SendClientMessageToAll() will send all players the command great for /fakeban >:D heres a e.g. f (strcmp("/fakeban", cmdtext, true, 10) == 0) { SendClientMessageToAll(playerid, 0xFF0606AA,"You have been banned from the server"); SendClientMessageToAll(playerid, 0xAFAFAFAA,"server closed connection"); return 1; }
Hope the tut helped
Wont be the best tut :/
Secound Tut first one wasnt good hope i done better
By SwiftKidZ