Script help -
GREEKman - 11.08.2012
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
Re: Script help -
RedJohn - 11.08.2012
SendClientMessage is for messages like chat. Use dialog and it will be in center. Follow this
LINK
Use Dialog Style: DIALOG_STYLE_MSGBOX
Re: Script help -
GREEKman - 11.08.2012
thank you very much !
Re: Script help -
Devilxz97 - 11.08.2012
Dialog Styles:
https://sampwiki.blast.hk/wiki/Dialog_Styles
ShowPlayerDialog:
https://sampwiki.blast.hk/wiki/ShowPlayerDialog
Re: Script help -
GREEKman - 11.08.2012
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
Re: Script help -
DarkB0y - 11.08.2012
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;
}
Re: Script help -
GREEKman - 11.08.2012
VERY GOOD ,2 warning but is ok , so i must have 2 buttons thank you !
Re: Script help -
DarkB0y - 11.08.2012
tell me the errors maybe i can help
Re: Script help -
GREEKman - 11.08.2012
i have no errors now but my box is too small i have many lines can you help ?
Re: Script help -
PawnFox - 11.08.2012
Dude, use strcat for big dialogs ..
https://sampwiki.blast.hk/wiki/Strcat