Have a Problem
#1

why every time I put the color format into a dialogue like this, then it could not be compiled and pawn suddenly not responding..

just works without color

this is my gamemodes roleplay, but i use in my gamemodes freeroam its worked!
can help?

PHP код:
#define RED_E         "{FF0000}"
#define BLUE_E         "{004BFF}"
#define SBLUE_E             "{56A4E4}"
#define PINK_E         "{FFB6C1}"
#define YELLOW_E     "{FFFF00}"
#define LG_E         "{00FF00}"
#define LB_E         "{15D4ED}"
#define LB2_E         "{87CEFA}"
#define GREY_E         "{BABABA}"
#define GREY2_E     "{778899}"
#define GREY3_E     "{C8C8C8}"
#define DARK_E         "{7A7A7A}"
#define WHITE_E     "{FFFFFF}"
#define WHITEP_E     "{FFE4C4}"
#define IVORY_E             "{FFFF82}"
#define ORANGE_E     "{DB881A}"
#define GREEN_E     "{3BBD44}"
#define PURPLE_E     "{5A00FF}"
#define LIME_E         "{D2D2AB}"
#define LRED_E        "{E65555}"
#define DOOM_        "{F4A460}"
#define W            "{FFFFFF}"
#define R            "{FF0000}" 
PHP код:
    format(linesizeof(line), ""RED_E"You have been banned!\n\n"LB2_E"Ban Info:\n"RED_E"Name: "GREY2_E"%s\n"RED_E"IP: "GREY2_E"%s\n"RED_E"Admin: "GREY2_E"%s\n"RED_E"Ban Reason: "GREY2_E"%s\n"RED_E"Ban Date: "GREY2_E"%02d:%02d (%02d/%02d/%d)\n\n"WHITE_E"Feel that you were wrongfully banned? Appeal at nfs-server.pe.hu/forums"pName[playerid], pIP[playerid], pName[adminid], reasonhourminutemonthdayyear);
    
ShowPlayerDialog(playeridNO_DIALOGDIALOG_STYLE_MSGBOX""RED_E"BANNED"line"Exit"""); 
Reply
#2

Compiles fine for me, sure that this is where the error lies?
Reply
#3

Instead of using pure hexidecimal color codes, you need to change them to work on SAMP

FF0000 would be 0xFF0000FF

0x - Begin of every Samp hex code
FF0000 - Color code
FF - Transparency (Can not be used in chat, so just put FF)

I have converted the Color codes for you:

Код:
#define RED_E         "0xFF0000FF" 
#define BLUE_E         "0x004BFFFF" 
#define SBLUE_E             "0x56A4E4FF" 
#define PINK_E         "0xFFB6C1FF" 
#define YELLOW_E     "0xFFFF00FF" 
#define LG_E         "0x00FF00FF" 
#define LB_E         "0x15D4EDFF" 
#define LB2_E         "0x87CEFAFF" 
#define GREY_E         "0xBABABAFF" 
#define GREY2_E     "0x778899FF" 
#define GREY3_E     "0xC8C8C8FF" 
#define DARK_E         "0x7A7A7AFF" 
#define WHITE_E     "0xFFFFFFFF" 
#define WHITEP_E     "0xFFE4C4FF" 
#define IVORY_E             "0xFFFF82FF" 
#define ORANGE_E     "0xDB881AFF" 
#define GREEN_E     "0x3BBD44FF" 
#define PURPLE_E     "0x5A00FFFF" 
#define LIME_E         "0xD2D2ABFF" 
#define LRED_E        "0xE65555FF" 
#define DOOM_        "0xF4A460FF" 
#define W            "0xFFFFFFFF" 
#define R            "0xFF0000FF"
Reply
#4

Or, learn how to code before using xSF' shitty script.
Reply
#5

Quote:
Originally Posted by Codeah
Посмотреть сообщение
Instead of using pure hexidecimal color codes, you need to change them to work on SAMP

FF0000 would be 0xFF0000FF

0x - Begin of every Samp hex code
FF0000 - Color code
FF - Transparency (Can not be used in chat, so just put FF)

I have converted the Color codes for you:

Код:
#define RED_E         "0xFF0000FF" 
#define BLUE_E         "0x004BFFFF" 
#define SBLUE_E             "0x56A4E4FF" 
#define PINK_E         "0xFFB6C1FF" 
#define YELLOW_E     "0xFFFF00FF" 
#define LG_E         "0x00FF00FF" 
#define LB_E         "0x15D4EDFF" 
#define LB2_E         "0x87CEFAFF" 
#define GREY_E         "0xBABABAFF" 
#define GREY2_E     "0x778899FF" 
#define GREY3_E     "0xC8C8C8FF" 
#define DARK_E         "0x7A7A7AFF" 
#define WHITE_E     "0xFFFFFFFF" 
#define WHITEP_E     "0xFFE4C4FF" 
#define IVORY_E             "0xFFFF82FF" 
#define ORANGE_E     "0xDB881AFF" 
#define GREEN_E     "0x3BBD44FF" 
#define PURPLE_E     "0x5A00FFFF" 
#define LIME_E         "0xD2D2ABFF" 
#define LRED_E        "0xE65555FF" 
#define DOOM_        "0xF4A460FF" 
#define W            "0xFFFFFFFF" 
#define R            "0xFF0000FF"
Umm hexadecimal colors work just fine in SA-MP?...


Example:
Код:
 
#define RED_E         "{FF0000}"
#define LB2_E         "{87CEFA}"
format(str, sizeof(str, ""LB2_E"something here "RED_E"");
Reply
#6

Quote:
Originally Posted by Codeah
Посмотреть сообщение
Instead of using pure hexidecimal color codes, you need to change them to work on SAMP

FF0000 would be 0xFF0000FF

0x - Begin of every Samp hex code
FF0000 - Color code
FF - Transparency (Can not be used in chat, so just put FF)

I have converted the Color codes for you:

Код:
#define RED_E         "0xFF0000FF" 
#define BLUE_E         "0x004BFFFF" 
#define SBLUE_E             "0x56A4E4FF" 
#define PINK_E         "0xFFB6C1FF" 
#define YELLOW_E     "0xFFFF00FF" 
#define LG_E         "0x00FF00FF" 
#define LB_E         "0x15D4EDFF" 
#define LB2_E         "0x87CEFAFF" 
#define GREY_E         "0xBABABAFF" 
#define GREY2_E     "0x778899FF" 
#define GREY3_E     "0xC8C8C8FF" 
#define DARK_E         "0x7A7A7AFF" 
#define WHITE_E     "0xFFFFFFFF" 
#define WHITEP_E     "0xFFE4C4FF" 
#define IVORY_E             "0xFFFF82FF" 
#define ORANGE_E     "0xDB881AFF" 
#define GREEN_E     "0x3BBD44FF" 
#define PURPLE_E     "0x5A00FFFF" 
#define LIME_E         "0xD2D2ABFF" 
#define LRED_E        "0xE65555FF" 
#define DOOM_        "0xF4A460FF" 
#define W            "0xFFFFFFFF" 
#define R            "0xFF0000FF"
nice.., but dont work
Reply
#7

I guess it's just an open or closed unnecessary bracket which causes the compiler to crash, I've experienced it too.
Once, I added this somewhere in my script:
PHP код:
CMD
and after I wanted to compile, it crashed. After 1 hour of re-search, I found out that it was that stupid 'CMD:' thing which I per accidentally added.

So I assume it's somewhere else in your script.
Reply
#8

Quote:
Originally Posted by Codeah
Посмотреть сообщение
Instead of using pure hexidecimal color codes, you need to change them to work on SAMP

FF0000 would be 0xFF0000FF

0x - Begin of every Samp hex code
FF0000 - Color code
FF - Transparency (Can not be used in chat, so just put FF)

I have converted the Color codes for you:

Код:
#define RED_E         "0xFF0000FF" 
#define BLUE_E         "0x004BFFFF" 
#define SBLUE_E             "0x56A4E4FF" 
#define PINK_E         "0xFFB6C1FF" 
#define YELLOW_E     "0xFFFF00FF" 
#define LG_E         "0x00FF00FF" 
#define LB_E         "0x15D4EDFF" 
#define LB2_E         "0x87CEFAFF" 
#define GREY_E         "0xBABABAFF" 
#define GREY2_E     "0x778899FF" 
#define GREY3_E     "0xC8C8C8FF" 
#define DARK_E         "0x7A7A7AFF" 
#define WHITE_E     "0xFFFFFFFF" 
#define WHITEP_E     "0xFFE4C4FF" 
#define IVORY_E             "0xFFFF82FF" 
#define ORANGE_E     "0xDB881AFF" 
#define GREEN_E     "0x3BBD44FF" 
#define PURPLE_E     "0x5A00FFFF" 
#define LIME_E         "0xD2D2ABFF" 
#define LRED_E        "0xE65555FF" 
#define DOOM_        "0xF4A460FF" 
#define W            "0xFFFFFFFF" 
#define R            "0xFF0000FF"
yep do this but in the dialog put the color code like this ShowPlayerDialog(.....,"{FFFFF}example","OK","");
Hope you get it!
Reply
#9

Quote:
Originally Posted by KillerStrike23
Посмотреть сообщение
yep do this but in the dialog put the color code like this ShowPlayerDialog(.....,"{FFFFF}example","OK","");
Hope you get it!
wow.. its worked! thanks
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)