03.03.2019, 04:36
When mSelection menu pops up and player choose any char or Cancel Next Prev td, it don't response
OnDialogResponse
OnPlayerModelSelection
OnDialogResponse
PHP код:
if(dialogid==DIALOG_POLICELOCKER){
if(response){
switch(listitem){
case 0:{
if(PlayerInfo[playerid][pFDuty]==1){
PlayerInfo[playerid][pFDuty]=0;
SetPlayerColor(playerid, COLOR_WHITE);
}else{
PlayerInfo[playerid][pFDuty]=1;
SetPlayerColor(playerid, COLOR_LIGHTBLUE);
}
}
case 1:{
ShowModelSelectionMenu(playerid, policeskins, "Select Skin"); //mSelection Menu
}
case 2:{
PlayerInfo[playerid][pRadio]=1;
SendClientMessage(playerid, COLOR_LIGHTBLUE, "** You have taken a radio from locker.");
}
case 3:{
ShowPlayerDialog(playerid, DIALOG_POLICEWEAPON, DIALOG_STYLE_LIST, "Available Weapons", "Nightstick\t\t\tFree\nDesert Eagle\t\t\t$500\nShotgun\t\t\t$700\nAK-47\t\t\t\t$1000\nMP-5\t\t\t$850\nCountry Rifle\t\t\t$600\nNight Vis. Goggles\t\tFree\nThermal Goggles\t\tFree\nPortable MDC\t\t\tFree", "Select", "Cancel");
}
case 4:{
SendClientMessage(playerid, COLOR_LIGHTBLUE, "You have taken a medic kit.");
SetPlayerHealth(playerid, 100.00);
}
case 5:{
SendClientMessage(playerid, COLOR_LIGHTBLUE, "You have taken a Kevlar.");
SetPlayerArmour(playerid, 100.00);
}
}
}
return 1;
}
PHP код:
public OnPlayerModelSelection(playerid, response, listid, modelid)
{
print("Called");
if(listid == policeskins)
{
print("Responsed");
if(response)
{
SendClientMessage(playerid, COLOR_LIGHTBLUE, "** You have changed your uniform.");
SetPlayerSkin(playerid, modelid);
}else{
return 1;
}
return 1;
}
return 1;
}