String lenght is too high
#27

Quote:
Originally Posted by Adamoneoone
Посмотреть сообщение
Alright, thanks a lot I think that will do instead. When I'm going to use OnDialogResponse, the process is the same?
Each case corresponds to an item of the array?
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)
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: 7 Guest(s)