SA-MP Forums Archive
help in this code please - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: help in this code please (/showthread.php?tid=640000)



help in this code please - BadJih - 26.08.2017

this code :
CMD:factions(playerid)
{
SendClientMessage(playerid, TCOLOR_BLUE, "1: Los Santos Police Department - Required Level: 3");
SendClientMessage(playerid, TCOLOR_NAVYBLUE, "2: Federal Bureau of Investigation");
SendClientMessage(playerid, TCOLOR_BEIGE, "3: San Andreas Sheriff Department");
SendClientMessage(playerid, TCOLOR_PARAMEDIC, "4: LSFMD - Required Level: 3");
SendClientMessage(playerid, TCOLOR_LIGHTGREEN, "5: San Andreas National Guard - Required Level: 3");
SendClientMessage(playerid, TCOLOR_SENATE, "6: Senate - Required Level: 10");
SendClientMessage(playerid, TCOLOR_BLUE, "7: Hitmen Agency - Required Level: Unknown");
SendClientMessage(playerid, TCOLOR_NEWS, "8: San Andreas News - Required Level: 3");
SendClientMessage(playerid, TCOLOR_YELLOW, "9: Taxi Company");
return 1;
}
i want show in dialog with "okey" button


Re: help in this code please - SuperHelper - 26.08.2017

Код:
CMD:factions(playerid, params[])
{
	{
		ShowPlayerDialog(playerid, 2, DIALOG_STYLE_LIST, "Factions Of Server", "1: Los Santos Police Department - Required Level: 3\n2: Federal Bureau of Investigation\n3: San Andreas Sheriff Department\n4: LSFMD - Required Level: 3\n5: San Andreas National Guard - Required Level: 3\n6: Senate - Required Level: 10\n7: Hitmen Agency - Required Level: Unknown\n8: San Andreas News - Required Level: 3\n9: Taxi Company\n", "Ok", "");
	}
	return 1;
}
test this i hope this work

you can make any command in dialog using this methode
Код:
CMD:yourcmdname(playerid, params[])
{
{
 ShowPlayerDialog(playerid, 2, DIALOG_STYLE_MSGBOX, "Your heading", "\n1>\n2>\n", "Ok", "");
}
return 1;
}



Re: help in this code please - BadJih - 26.08.2017

Quote:
Originally Posted by SuperHelper
Посмотреть сообщение
Код:
CMD:factions(playerid, params[])
{
	{
		ShowPlayerDialog(playerid, 2, DIALOG_STYLE_LIST, "Factions Of Server", "1: Los Santos Police Department - Required Level: 3\n2: Federal Bureau of Investigation\n3: San Andreas Sheriff Department\n4: LSFMD - Required Level: 3\n5: San Andreas National Guard - Required Level: 3\n6: Senate - Required Level: 10\n7: Hitmen Agency - Required Level: Unknown\n8: San Andreas News - Required Level: 3\n9: Taxi Company\n", "Ok", "");
	}
	return 1;
}
test this i hope this work

you can make any command in dialog using this methode
Код:
CMD:yourcmdname(playerid, params[])
{
{
 ShowPlayerDialog(playerid, 2, DIALOG_STYLE_MSGBOX, "Your heading", "\n1>\n2>\n", "Ok", "");
}
return 1;
}
Thanks bro but i want it with its colors


Re: help in this code please - SuperHelper - 26.08.2017

Quote:
Originally Posted by BadJih
Посмотреть сообщение
Thanks bro but i want it with its colors
go here for color codes
Click here

do \n{COLOR_CODE}1: Police\n{SAME}\n


Re: help in this code please - Barnwell - 26.08.2017

Or Try a hex colors.
https://sampwiki.blast.hk/wiki/Hex_colours


Re: help in this code please - BadJih - 26.08.2017

Quote:
Originally Posted by Barnwell
Посмотреть сообщение
<3 <3 <3 <3 <3 <3 <3 <3 <3 <3 <3 Thanks bro , thank you all guys <3


Re: help in this code please - BadJih - 26.08.2017

Quote:
Originally Posted by SuperHelper
Посмотреть сообщение
go here for color codes
Click here

do \n{COLOR_CODE}1: Police\n{SAME}\n
bro i tested the codes u gave me .... worked but when i click a faction they give me a message (SERVER: You are already logged in.)


Re: help in this code please - Dayrion - 26.08.2017

Color in a message should by in hexadecimal : {RRGGBB}
In a function like SendClientMessage, it's heaxdecimal too but with Alpha values: 0xRRGGBBAA

Example:
0xFF0000FF -> Red
{0000ff} -> Blue
PHP код:
SendClientMessage(playerid0xFF0000FF"This is red and this {0000ff}blue"); 



Re: help in this code please - HoussemGaming - 26.08.2017

Quote:
Originally Posted by BadJih
Посмотреть сообщение
bro i tested the codes u gave me .... worked but when i click a faction they give me a message (SERVER: You are already logged in.)
Change your dialog id to 999


Re: help in this code please - BadJih - 26.08.2017

Quote:
Originally Posted by Dayrion
Посмотреть сообщение
Color in a message should by in hexadecimal : {RRGGBB}
In a function like SendClientMessage, it's heaxdecimal too but with Alpha values: 0xRRGGBBAA

Example:
0xFF0000FF -> Red
{0000ff} -> Blue
PHP код:
SendClientMessage(playerid0xFF0000FF"This is red and this {0000ff}blue"); 
problem is not with colors , this is the problem ... so... when i click ok this appears..

http://i.imgur.com/RKgn12c.jpg
http://i.imgur.com/VPFAiaX.jpg