16.11.2014, 03:58
Hi all. I appear to be having an issue I can't solve.
Basically, my desire is to have a dialog box appear with the list items "Uniform" and "Equipment". Then when they click on Uniform, it lists several skins, and when they click on Equipment, it lists several weapons etc.
I have the "Uniform" and "Equipment" dialog list appearing fine. Then when I click into one of them, the next dialog also appears fine, depending on which I've selected. However, if I'm inside Equipment and I select something (Sidearm for example) it changes my skin/ For some reason, the processing for the uniform dialog is executed, instead of the correct equipment processing.
Below is my dialog coding:
Any help would be much appreciated!
Basically, my desire is to have a dialog box appear with the list items "Uniform" and "Equipment". Then when they click on Uniform, it lists several skins, and when they click on Equipment, it lists several weapons etc.
I have the "Uniform" and "Equipment" dialog list appearing fine. Then when I click into one of them, the next dialog also appears fine, depending on which I've selected. However, if I'm inside Equipment and I select something (Sidearm for example) it changes my skin/ For some reason, the processing for the uniform dialog is executed, instead of the correct equipment processing.
Below is my dialog coding:
Код:
if(dialogid == pdlocker){
//PD Locker dialog
if(response){
switch(listitem){
case 0:{
ShowPlayerDialog(playerid, pdlockeruniform, DIALOG_STYLE_LIST, "Uniform", "Uniform 1 ((Tenpen))\nUniform 2 ((Pulaski))\nUniform 3 ((Hernandez))\nUniform 4 ((LSPD))\nUniform 5 ((SFPD))\nMotorcyle/Pilot Uniform\nS.W.A.T Uniform", "Change", "<<");
}
case 1:{
ShowPlayerDialog(playerid, pdlockerguns, DIALOG_STYLE_LIST, "Equipment", "Baton\nPepper Spray\nSidearm\nShotgun\nSub-Machine Gun\nAssault Rifle\nKevlar Vest", "Equip", "<<");
}
}
}
return 1;
}
if(dialogid == pdlockeruniform){
//PD Locker dialog
if(response){
switch(listitem){
case 0:{
//uniform 1 - skin 265
SetPlayerSkin(playerid, 265);
}
case 1:{
//uniform 2 - skin 266
SetPlayerSkin(playerid, 266);
}
case 2:{
//uniform 3 - skin 267
SetPlayerSkin(playerid, 267);
}
case 3:{
//uniform 4 - skin 280
SetPlayerSkin(playerid, 280);
}
case 4:{
//uniform 5 - skin 281
SetPlayerSkin(playerid, 281);
}
case 5:{
//motorcyle/pilot - skin 284
SetPlayerSkin(playerid, 284);
}
case 6:{
//swat - skin 285
SetPlayerSkin(playerid, 285);
}
}
}
return 1;
}
if(dialogid == pdlockerguns){
//PD Locker dialog
if(response){
switch(listitem){
case 0:{
//baton
GivePlayerWeapon(playerid, 3, 1);
}
case 1:{
//pepper spray
GivePlayerWeapon(playerid, 41, 99999);
}
case 2:{
//sidearm
GivePlayerWeapon(playerid, 24, 100);
}
case 3:{
//shotgun
GivePlayerWeapon(playerid, 25, 40);
}
case 4:{
//mp5
GivePlayerWeapon(playerid, 29, 250);
}
case 5:{
//m4
GivePlayerWeapon(playerid, 31, 250);
}
case 6:{
//kevlar
SetPlayerArmour(playerid, 100.0);
}
}
}
return 1;
}


