[Tutorial] Some Commands !
#1

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....

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
Ofc you Can Change The Colours If DARKGREY copy it's Code 0x696969FF Or Blue Copy It's Code .....
OnPlayerCommandText

pawn Code:
if(strcmp(cmdtext, "/rules", true, 10) == 0)
{
//Now TO SHow The Players Rules Do This!
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.
//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
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 :)
More Comming Soon..

Sorry For My Fails :P
Reply


Messages In This Thread
Some Commands ! - by Roomeo - 05.03.2011, 10:51
Re: Some Commands ! - by ilikenuts - 05.03.2011, 12:35
Re: Some Commands ! - by alpha500delta - 05.03.2011, 13:26
Re: Some Commands ! - by ilikenuts - 05.03.2011, 13:33
Re: Some Commands ! - by Roomeo - 05.03.2011, 14:42
Re: Some Commands ! - by alpha500delta - 05.03.2011, 16:48
Re: Some Commands ! - by jamesbond007 - 05.03.2011, 17:09
Re: Some Commands ! - by -Rebel Son- - 05.03.2011, 17:37
Re: Some Commands ! - by Kwarde - 05.03.2011, 19:48
Re: Some Commands ! - by Mean - 06.03.2011, 17:30

Forum Jump:


Users browsing this thread: 1 Guest(s)