String lenght is too high
#28

Quote:
Originally Posted by Sasino97
Посмотреть сообщение
Yes, the listitem will be the array index. Additionally you could do this, to avoid writing a single case for each item. Change this:

PHP код:
new vehList[][] = {
        {
"{FFFFFF}BMX"},
}; 
To this:

PHP код:
new vehList[][] = {
        
//model, price, name
        
{481500"{FFFFFF}BMX"},
        {
593125000"{FFFFFF}Dodo"},
        {
58725000"{FFFFFF}Euros"}
}; 
And then

PHP код:
public OnDialogResponse(...)
{
    ...
    case 
DIALOG_VEHICLES:
    {
        new 
modelid vehList[listitem][0];
        new 
price vehList[listitem][1];
        new 
modelName[32];
        
format(modelNamesizeof(modelName), vehList[listitem][2]);
        ... 
// deal with the rest
    
}
    ...

(Untested)
Hey mate, I tried doing this:
PHP код:
case 8:
    {    
            new 
price vehList[listitem][1];
        new 
carname vehList[listitem][2];
        new 
modelName[32], title[90];
        
format(title,sizeof(title),"{FFFFFF}Game Shop{FF0080} Available Money: %f"GetPlayerMoney(playerid);
        
format(modelNamesizeof(modelName), "%s {FF0080}$%s"carnameprice);
        
ShowPlayerDialog(playeridDIALOG_SHOPVEHICLESDIALOG_STYLE_LISTtitlemodelName"Select""Close");
    } 
With your:
PHP код:
new vehList[][] = {
        
//model, price, name
        
{481500"{FFFFFF}BMX"},
        {
593125000"{FFFFFF}Dodo"},
        {
58725000"{FFFFFF}Euros"}
}; 
However, when I go ingame, nothing shows at all
Reply


Messages In This Thread
String lenght is too high - by Adamoneoone - 26.06.2018, 10:44
Re: String lenght is too high - by JasonRiggs - 26.06.2018, 11:12
Re: String lenght is too high - by RoboN1X - 26.06.2018, 11:28
Re: String lenght is too high - by Adamoneoone - 26.06.2018, 11:42
Re: String lenght is too high - by Adamoneoone - 26.06.2018, 12:01
Re: String lenght is too high - by aoky - 26.06.2018, 12:07
Re: String lenght is too high - by Adamoneoone - 26.06.2018, 12:08
Re: String lenght is too high - by Spmn - 26.06.2018, 12:46
Re: String lenght is too high - by Adamoneoone - 26.06.2018, 14:29
Re: String lenght is too high - by GTLS - 26.06.2018, 14:54
Re: String lenght is too high - by Adamoneoone - 26.06.2018, 17:04
Re: String lenght is too high - by JasonRiggs - 26.06.2018, 17:26
Re: String lenght is too high - by Adamoneoone - 26.06.2018, 19:16
Re: String lenght is too high - by Adamoneoone - 27.06.2018, 13:36
Re: String lenght is too high - by GTLS - 27.06.2018, 15:26
Re: String lenght is too high - by Zeth - 27.06.2018, 15:42
Re: String lenght is too high - by Adamoneoone - 27.06.2018, 16:03
Re: String lenght is too high - by Verc - 27.06.2018, 20:47
Re: String lenght is too high - by CodeStyle175 - 27.06.2018, 21:06
Re: String lenght is too high - by Adamoneoone - 28.06.2018, 07:15
Re: String lenght is too high - by xMoBi - 28.06.2018, 07:22
Re: String lenght is too high - by Adamoneoone - 28.06.2018, 20:07
Re: String lenght is too high - by GhostHacker9 - 29.06.2018, 02:49
Re: String lenght is too high - by NaS - 29.06.2018, 05:48
Re: String lenght is too high - by xMoBi - 29.06.2018, 06:03
Re: String lenght is too high - by Adamoneoone - 29.06.2018, 07:03
Re: String lenght is too high - by Sasino97 - 29.06.2018, 14:44
Re: String lenght is too high - by Adamoneoone - 29.06.2018, 16:13
Re: String lenght is too high - by Adamoneoone - 30.06.2018, 20:43
Re: String lenght is too high - by Adamoneoone - 01.07.2018, 20:51
Re: String lenght is too high - by CodeStyle175 - 01.07.2018, 20:52
Re: String lenght is too high - by Adamoneoone - 01.07.2018, 22:25

Forum Jump:


Users browsing this thread: 1 Guest(s)