Script help
#1

Hello , i run a 20port server in my home , i will find host but for now i am ok , i made something and i need some help to do my work better

Код:
public OnPlayerCommandText(playerid, cmdtext[])
{
 	if (strcmp("/Heal", cmdtext, true, 5) == 0)
 	{

	 	SetPlayerHealth(playerid,100);
		SendClientMessage(playerid,0xaa3333a, "Life for you!");
 		return 1;
 	}
 	if (strcmp("/kill", cmdtext, true, 5) == 0)
 	{
 		SetPlayerHealth(playerid,0);
 		SendClientMessage(playerid,0xaa3333aa, "See you in hell!");
		 return 1;
	 }
 	if (strcmp("/Help", cmdtext, true, 5) == 0)
 	 {
	    SendClientMessage(playerid,0xaa3333a,"=====[RULES]=====");
 		SendClientMessage(playerid,0xaa3333a,"Respect Admins + Players");
 		SendClientMessage(playerid,0xaa3333a,"");
		SendClientMessage(playerid,0xaa3333a,"Dm allowded only in dm events!");
		SendClientMessage(playerid,0xaa3333a,"===========================================");
		SendClientMessage(playerid,0xaa3333a,"=====[COMMANDS]=====");
		SendClientMessage(playerid,0xaa3333a,"/Cmds all commands");
		SendClientMessage(playerid,0xaa3333a,"/Teles all teleports");
		SendClientMessage(playerid,0xaa3333a,"Car help : /v vehicle menu /tcar 1-10 a tuned car ! /car [name] a car ! ");
		return 1;
 }
 	return 0;
when i type /help it appears on chat , i want it middle in the screen
anyone help me to do it better !

sorry for my bad engls
Reply
#2

SendClientMessage is for messages like chat. Use dialog and it will be in center. Follow this LINK
Use Dialog Style: DIALOG_STYLE_MSGBOX
Reply
#3

thank you very much !
Reply
#4

Dialog Styles: https://sampwiki.blast.hk/wiki/Dialog_Styles
ShowPlayerDialog: https://sampwiki.blast.hk/wiki/ShowPlayerDialog
Reply
#5

hm... an other problem can anyone help pls ?

Код:
error 001: expected token: "-string end-", but found "-identifier-"
Код:
public OnPlayerCommandText(playerid, cmdtext[])
{
	if (strcmp("/help", cmdtext, true, 10) == 0)
	{
		ShowPlayerDialog(playerid,0,DIALOG_STYLE_MSGBOX,"Sever Rules", "=======]RULES[========","{0xFFFFFFFF}1.Respect Admins + Players/n{0xFFFFFFFF}2.Dm allowded only in dm events/n{0xFFFFFFFF}3. Car"/"Thank you!","");
		return 1;
	}
	return 0
Reply
#6

pawn Код:
if(strcmp(cmdtext,"/help",true)==0)
    {
ShowPlayerDialog(playerid,0,DIALOG_STYLE_MSGBOX,"Sever Rules", "=======]RULES[========","{0xFFFFFFFF}1.Respect Admins + Players/n{0xFFFFFFFF}2.Dm allowded only in dm events/n{0xFFFFFFFF}3. Car","Ok","Close");
    return 1;
    }
Reply
#7

VERY GOOD ,2 warning but is ok , so i must have 2 buttons thank you !
Reply
#8

tell me the errors maybe i can help
Reply
#9

i have no errors now but my box is too small i have many lines can you help ?
Reply
#10

Dude, use strcat for big dialogs .. https://sampwiki.blast.hk/wiki/Strcat
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)