samp cmd skins
#1

PHP код:
new PHONE_MODELS[] = {
    
18871, 18872, 18874, 18866
};
new 
PHONE_NAMES[][] = {
    
"iPhone", "Samsung", "Nokia", "Motorola"
};
new 
PHONE_IDS[] = {
    
"Iphone", "Samsung", "Nokia", "Motorola"
};
CMD:phones(playerid) {
    return 
ShowPreviewModelDialog(playerid, 0, "Phone Selection Dialog", PHONE_MODELS, PHONE_NAMES, "Select", "Cancel");
} 
Problem is that models are in their natural position, how can I set them to be vertically instead of horizontally?
Reply
#2

Copy-Pasting only goes so far...
Reply
#3

Quote:
Originally Posted by Sew_Sumi
Посмотреть сообщение
Copy-Pasting only goes so far...
Well because solo I reached so far here,

PHP код:
new PHONE_MODELS[] = {
    
18871, 18872, 18874, 18866
};
new 
PHONE_NAMES[][] = {
    
"iPhone", "Samsung", "Nokia", "Motorola"
};
new 
PHONE_IDS[] = {
    
"Iphone", "Samsung", "Nokia", "Motorola"
};
CMD:phones(playerid) {
    return 
ShowPreviewModelDialog(playerid, 0, "Phone Selection Dialog", PHONE_MODELS, PHONE_NAMES, "Select", "Cancel");
} 

But it shows phones horizontally instead of vertically
Reply
#4

Are you like intentionally screwing with your users or something? /skins to do phones, /phone to do skins?
Reply
#5

Quote:
Originally Posted by Sew_Sumi
Посмотреть сообщение
Are you like intentionally screwing with your users or something? /skins to do phones, /phone to do skins?
Good ideea.
Reply
#6

You don't need "PHONE_IDS", i made that for wepons dialog because weaponid and weapon model have different values.

Here is how you should do it:
PHP код:
new PHONE_MODELS[] = { 
    
18871, 18872, 18874, 18866 
}; 
new 
PHONE_NAMES[][] = { 
    
"iPhone", "Samsung", "Nokia", "Motorola" 
}; 
CMD:phones(playerid) { 
    
// for adjusting every model rotation
    
for (new i = 0; i < sizeof(PHONE_MODELS); i++) {
        
SetDialogPreviewRotation(playerid, i, rx, ry, rz, zoom); // put your values here
    
}
    return 
ShowPreviewModelDialog(playerid, 0, "Phone Selection Dialog", PHONE_MODELS, PHONE_NAMES, "Select", "Cancel"); 
}
public 
OnDialogResponse(playerid, dialogid, response, listitem, inputtext[]) {
    if (
dialogid == 0) {
        if (
response) {
            switch (
listitem) {
                case 
0: {} // iphone
                
case 1: {} // samsung
                // and so on....
            
}
        }
    }
    return 
1;
} 
Reply
#7

Quote:
Originally Posted by Gammix
Посмотреть сообщение
You don't need "PHONE_IDS", i made that for wepons dialog because weaponid and weapon model have different values.

Here is how you should do it:
PHP код:
new PHONE_MODELS[] = { 
    
18871, 18872, 18874, 18866 
}; 
new 
PHONE_NAMES[][] = { 
    
"iPhone", "Samsung", "Nokia", "Motorola" 
}; 
CMD:phones(playerid) { 
    
// for adjusting every model rotation
    
for (new i = 0; i < sizeof(PHONE_MODELS); i++) {
        
SetDialogPreviewRotation(playerid, i, rx, ry, rz, zoom); // put your values here
    
}
    return 
ShowPreviewModelDialog(playerid, 0, "Phone Selection Dialog", PHONE_MODELS, PHONE_NAMES, "Select", "Cancel"); 
}
public 
OnDialogResponse(playerid, dialogid, response, listitem, inputtext[]) {
    if (
dialogid == 0) {
        if (
response) {
            switch (
listitem) {
                case 
0: {} // iphone
                
case 1: {} // samsung
                // and so on....
            
}
        }
    }
    return 
1;
} 
Thank you.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)