help in this code please
#1

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
Reply
#2

Код:
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;
}
Reply
#3

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
Reply
#4

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
Reply
#5

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

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

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.)
Reply
#8

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"); 
Reply
#9

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
Reply
#10

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
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)