SA-MP Forums

Go Back   SA-MP Forums > SA-MP Scripting and Plugins > Scripting Help

Reply
 
Thread Tools Display Modes
Old 26/08/2017, 06:19 PM   #1
BadJih
Huge Clucker
 
BadJih's Avatar
 
Join Date: Aug 2017
Posts: 238
Reputation: 21
Thumbs up help in this code please

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
BadJih is offline   Reply With Quote
Old 26/08/2017, 06:31 PM   #2
SuperHelper
Banned
 
Join Date: Aug 2017
Posts: 37
Reputation: 1
Default Re: help in this code please

Code:
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
Code:
CMD:yourcmdname(playerid, params[])
{
{
 ShowPlayerDialog(playerid, 2, DIALOG_STYLE_MSGBOX, "Your heading", "\n1>\n2>\n", "Ok", "");
}
return 1;
}
SuperHelper is offline   Reply With Quote
Old 26/08/2017, 07:35 PM   #3
BadJih
Huge Clucker
 
BadJih's Avatar
 
Join Date: Aug 2017
Posts: 238
Reputation: 21
Default Re: help in this code please

Quote:
Originally Posted by SuperHelper View Post
Code:
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
Code:
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
BadJih is offline   Reply With Quote
Old 26/08/2017, 07:48 PM   #4
SuperHelper
Banned
 
Join Date: Aug 2017
Posts: 37
Reputation: 1
Default Re: help in this code please

Quote:
Originally Posted by BadJih View Post
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
SuperHelper is offline   Reply With Quote
Old 26/08/2017, 08:00 PM   #5
Barnwell
Banned
 
Join Date: May 2014
Location: England
Posts: 553
Reputation: 40
Default Re: help in this code please

Or Try a hex colors.
http://wiki.sa-mp.com/wiki/Hex_colours
Barnwell is offline   Reply With Quote
Old 26/08/2017, 08:18 PM   #6
BadJih
Huge Clucker
 
BadJih's Avatar
 
Join Date: Aug 2017
Posts: 238
Reputation: 21
Default Re: help in this code please

Quote:
Originally Posted by Barnwell View Post
<3 <3 <3 <3 <3 <3 <3 <3 <3 <3 <3 Thanks bro , thank you all guys <3
BadJih is offline   Reply With Quote
Old 26/08/2017, 08:23 PM   #7
BadJih
Huge Clucker
 
BadJih's Avatar
 
Join Date: Aug 2017
Posts: 238
Reputation: 21
Default Re: help in this code please

Quote:
Originally Posted by SuperHelper View Post
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.)
BadJih is offline   Reply With Quote
Old 26/08/2017, 08:38 PM   #8
Dayrion
High-roller
 
Dayrion's Avatar
 
Join Date: Jan 2016
Location: France
Posts: 1,920
Reputation: 258
Default Re: help in this code please

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 Code:
SendClientMessage(playerid0xFF0000FF"This is red and this {0000ff}blue"); 
__________________
actor_plus - v5.0.2
I'm a goner, somebody catch my breath,
I'm a goner, somebody catch my breath
Dayrion is offline   Reply With Quote
Old 26/08/2017, 08:41 PM   #9
HoussemGaming
Banned
 
Join Date: Jun 2017
Location: France
Posts: 190
Reputation: 10
Default Re: help in this code please

Quote:
Originally Posted by BadJih View Post
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
HoussemGaming is offline   Reply With Quote
Old 26/08/2017, 08:46 PM   #10
BadJih
Huge Clucker
 
BadJih's Avatar
 
Join Date: Aug 2017
Posts: 238
Reputation: 21
Default Re: help in this code please

Quote:
Originally Posted by Dayrion View Post
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 Code:
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

Last edited by BadJih; 26/08/2017 at 09:52 PM.
BadJih is offline   Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
[solved]Converting my old Mysql code to new mysql code.. Darrenr Scripting Help 1 22/03/2015 04:05 PM
help with this code recor Scripting Help 1 30/08/2013 09:22 PM
How to make when using pawno and type part of the code, to show the full code ? bustern Scripting Help 10 28/08/2013 10:10 AM
[Tool/Web/Other] Code Highlighter - Highlight code to find brackets, organize code, ... Sinner Tools and Files 8 09/03/2012 02:28 PM
Get ride of wepons on Spawn code | need code cssbart Help Archive 5 19/04/2010 07:05 PM


All times are GMT. The time now is 11:51 AM.


Powered by vBulletin® Version 3.8.6
Copyright ©2000 - 2019, Jelsoft Enterprises Ltd.