05.03.2011, 10:51
(
Last edited by Roomeo; 08/03/2011 at 03:53 PM.
)
This Is My First Tutorial In THis Tut i will Show You How TO Add /Rules /kill /Commands /credits And /Heal
first /Rules OK Let's Get Started....
Ofc you Can Change The Colours If DARKGREY copy it's Code 0x696969FF Or Blue Copy It's Code .....
OnPlayerCommandText
//Now TO SHow The Players Rules Do This!
//And In The End
return 1;
} // Bracket
// Second Thing /kill It's Very Easy.
And yes You Need if(strcmp(cmdtext, "/rules", true, 10) == 0) it's Very Important
More Comming Soon..
Sorry For My Fails :P
first /Rules OK Let's Get Started....
pawn Code:
//Colors
#define COLOR_GREY 0xAFAFAFAA
#define COLOR_GREEN 0x33AA33AA
#define COLOR_BRIGHTRED 0xFF0000AA
#define COLOR_YELLOW 0xFFFF00AA
#define COLOR_PINK 0xFF66FFAA
#define COLOR_BLUE 0x3A47DEFF
#define COLOR_TAN 0xBDB76BAA
#define COLOR_PURPLE 0x800080AA
#define COLOR_WHITE 0xFFFFFFAA
#define COLOR_LIGHTBLUE 0x33CCFFAA
#define COLOR_ORANGE 0xFF9900AA
#define COLOR_INDIGO 0x4B00B0AA
#define COLOR_BLACK 0x00000000
#define COLOR_DARKGREY 0x696969FF
OnPlayerCommandText
pawn Code:
if(strcmp(cmdtext, "/rules", true, 10) == 0)
{
pawn Code:
SendClientMessage(playerid, 0xFF0000AA," Rules"); //The player Will See Rules On The First Line.
SendClientMessage(playerid, 0xFF0000AA,"<> Do Not Ask To Be Admin. We Choose Admins!");
SendClientMessage(playerid, 0xFF0000AA,"<> Do Not Break The Rules You Can Get Punished"); // You Can Add More rules You Just Need To Do What i did SendClientMessage(playerid, Colour," Rule.
return 1;
} // Bracket
// Second Thing /kill It's Very Easy.
And yes You Need if(strcmp(cmdtext, "/rules", true, 10) == 0) it's Very Important
pawn Code:
if (strcmp("/Kill", cmdtext, true, 10) == 0) // like i said important Thing
{ // and Bracket
SetPlayerHealth(playerid, 0); // This will Set Player Hp To 0 and He Will Die
SendClientMessage(playerid, COLOR_BRIGHTRED, "You Killed Yourself!");// Message To Player
return 1; // And Yes this is also Important you need to place it in The End
}// Bracket :)
Sorry For My Fails :P