How to make /rules??
#1

I have no clue how to do this
Reply
#2

pawn Код:
if (strcmp("/rules", cmdtext, true) == 0)
{
    SendClientMessage(playerid, 0xFFFFFFAA, "Server rules:");
    SendClientMessage(playerid, 0xFFFFFFAA, "Bla bla bla...");
    return 1;
}
Add this code to OnPlayerCommandText.
Reply
#3

this is the easiest command ever i will try to learn you

ok go to: press CTRL+F nad type in ''OnPlayerCommandText''

it find the this than make command like this

Код:
public OnPlayerCommandText(playerid, cmdtext[])
{
	if (strcmp("/rules", cmdtext, true, 10) == 0)
if (strcmp("/rules", cmdtext, true, 10) == 0) ''/rules'' here mean when player type /rules it will show something like this

SendClientMessage(playerid,0x33AA33AA,"=========== ============================Rules================= ================");
SendClientMessage(playerid,0x24FF0AB9,"1.) This is NOT a DM server - NO RANDOM KILLING");
SendClientMessage(playerid,0x24FF0AB9,"2.) Respect Other Players - No Bitching, Insulting");
SendClientMessage(playerid,0x24FF0AB9,"3.) Respect Admins - No Bitching, instulting");
SendClientMessage(playerid,0x24FF0AB9,"4.) DONT ADVERTISE Other Server IP's");
SendClientMessage(playerid,0x24FF0AB9,"5.) DONT ask Admins if you can be Admin, If we need you we will ask you !");
SendClientMessage(playerid,0x24FF0AB9,"6.) DONT HACK or you will be BANNED");
SendClientMessage(playerid,0x24FF0AB9,"7.) DONT BITCHING in CHAT or you will be KICKED / BANNED");
SendClientMessage(playerid,0x33AA33AA,"==HAVE===== FUN=====WITH=====PLAYING=====REALITY=====COPS==ROB BERS==ROLEPLAY==");

but i am not good at scripting so i will give u my full command for /rules

Код:
public OnPlayerCommandText(playerid, cmdtext[])
{
	if (strcmp("/rules", cmdtext, true, 10) == 0)
	{
	SendClientMessage(playerid,0x33AA33AA,"=======================================Rules=================================");
	SendClientMessage(playerid,0x24FF0AB9,"1.) This is NOT a DM server - NO RANDOM KILLING");
	SendClientMessage(playerid,0x24FF0AB9,"2.) Respect Other Players - No Bitching, Insulting");
	SendClientMessage(playerid,0x24FF0AB9,"3.) Respect Admins - No Bitching, instulting");
	SendClientMessage(playerid,0x24FF0AB9,"4.) DONT ADVERTISE Other Server IP's");
	SendClientMessage(playerid,0x24FF0AB9,"5.) DONT ask Admins if you can be Admin, If we need you we will ask you !");
	SendClientMessage(playerid,0x24FF0AB9,"6.) DONT HACK or you will be BANNED");
	SendClientMessage(playerid,0x24FF0AB9,"7.) DONT BITCHING in CHAT or you will be KICKED / BANNED");
	SendClientMessage(playerid,0x33AA33AA,"==HAVE=====FUN=====WITH=====PLAYING=====REALITY=====COPS==ROBBERS==ROLEPLAY==");
	return 1;
}
btw u need to have #defines ''colors''

here u have them u put them to the top of the script

Код:
#define COLOR_GREY 0xAFAFAFAA
#define COLOR_RED 0xAA3333AA
#define COLOR_YELLOW 0xFFFF00AA
#define COLOR_PINK 0xFF66FFAA
#define COLOR_BLUE 0x0000BBAA
#define COLOR_WHITE 0xFFFFFFAA
#define COLOR_LIGHTBLUE 0x33CCFFAA
#define COLOR_DARKRED 0x660000AA
#define COLOR_ORANGE 0xFF9900AA
#define COLOR_BRIGHTRED 0xFF0000AA
#define COLOR_INDIGO 0x4B00B0AA
#define COLOR_VIOLET 0x9955DEEE
#define COLOR_LIGHTRED 0xFF99AADD
#define COLOR_SEAGREEN 0x00EEADDF
#define COLOR_GRAYWHITE 0xEEEEFFC4
#define COLOR_LIGHTNEUTRALBLUE 0xabcdef66
#define COLOR_GREENISHGOLD 0xCCFFDD56
#define COLOR_LIGHTBLUEGREEN 0x0FFDD349
#define COLOR_NEUTRALBLUE 0xABCDEF01
#define COLOR_LIGHTCYAN 0xAAFFCC33
#define COLOR_LEMON 0xDDDD2357
#define COLOR_MEDIUMBLUE 0x63AFF00A
#define COLOR_NEUTRAL 0xABCDEF97
#define COLOR_BLACK 0x00000000
#define COLOR_NEUTRALGREEN 0x81CFAB00
#define COLOR_DARKGREEN 0x12900BBF
#define COLOR_LIGHTGREEN 0x24FF0AB9
#define COLOR_DARKBLUE 0x300FFAAB
#define COLOR_BLUEGREEN 0x46BBAA00
#define COLOR_PINK 0xFF66FFAA
#define COLOR_LIGHTBLUE 0x33CCFFAA
#define COLOR_DARKRED 0x660000AA
#define COLOR_ORANGE 0xFF9900AA
#define COLOR_PURPLE 0x800080AA
#define COLOR_GRAD1 0xB4B5B7FF
#define COLOR_GRAD2 0xBFC0C2FF
#define COLOR_RED1 0xFF0000AA
#define COLOR_GREY 0xAFAFAFAA
#define COLOR_GREEN 0x33AA33AA
#define COLOR_RED 0xAA3333AA
#define COLOR_YELLOW 0xFFFF00AA
#define COLOR_WHITE 0xFFFFFFAA
#define COLOR_BROWN 0x993300AA
#define COLOR_CYAN 0x99FFFFAA
#define COLOR_TAN 0xFFFFCCAA
#define COLOR_PINK 0xFF66FFAA
#define COLOR_KHAKI 0x999900AA
#define COLOR_LIME 0x99FF00AA
#define COLOR_SYSTEM 0xEFEFF7AA
#define COLOR_GRAD2 0xBFC0C2FF
#define COLOR_GRAD4 0xD8D8D8FF
#define COLOR_GRAD6 0xF0F0F0FF
#define COLOR_GRAD2 0xBFC0C2FF
#define COLOR_GRAD3 0xCBCCCEFF
#define COLOR_GRAD5 0xE3E3E3FF
#define COLOR_GRAD1 0xB4B5B7FF
i think this is all what you need to know

i am to sleepy to make better tut ... if u dont know ask here in this topic ppl will help you and btw

use samp wiki to see more...

https://sampwiki.blast.hk/wiki/Main_Page

i hope i helped

btw u can change rules to ur own etc ...
Reply
#4

Quote:
Originally Posted by Gergo1352
pawn Код:
if (strcmp("/rules", cmdtext, true) == 0)
{
    SendClientMessage(playerid, 0xFFFFFFAA, "Server rules:");
    SendClientMessage(playerid, 0xFFFFFFAA, "Bla bla bla...");
    return 1;
}
Add this code to OnPlayerCommandText.
like that yeah
Reply
#5

i get it, thanks
Reply
#6

You're welcome.
Reply
#7

good
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)