11.01.2012, 19:23
who can help me to this getting work?
pawn Код:
public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
{
if(response)// They pressed the first button.
{
switch(dialogid)// If you only have one dialog, then this isn't required, but it's neater for when you implement more dialogs.
{
case 1:// Our dialog!ShowPlayerDialog(playerid, 1, DIALOG_STYLE_LIST, "Select your Weapons", "SMG-AK47-Grenades\ //Tec9-M4-Chainsaw\MicroSMG-Shotgun-Knife", "Choose");
{
switch(listitem)// Checking which listitem was selected
{
case 0:// The first item listed
{
GivePlayerWeapon( playerid, 29,500);
GivePlayerWeapon( playerid, 30,500);
GivePlayerWeapon( playerid, 16,10);
weapon[playerid]=2;
TogglePlayerControllable(playerid,true);
}
case 1: // The second item listed
{
GivePlayerWeapon( playerid, 32,500);
GivePlayerWeapon( playerid, 31,500);
GivePlayerWeapon( playerid, 9,1);
weapon[playerid]=3;
TogglePlayerControllable(playerid,true);
}
case 2: // The third item listed
{
GivePlayerWeapon( playerid, 28,500);
GivePlayerWeapon( playerid, 25,40);
GivePlayerWeapon( playerid, 4,1);
weapon[playerid]=4;
TogglePlayerControllable(playerid,true);
}
case 3: // The third item listed
{
if(IsPlayerLuxAdmin(playerid))
{
ShowPlayerDialog(playerid, 3, DIALOG_STYLE_LIST, "Admin Weapons", "MicroSMG-Sawnoff-Sniper\nTec9-Sawnoff-Sniper\nCombatShotgun-Sawnoff-Knife", "Choose", "No Weaps");
}
else SendClientMessage(playerid, COLOR_WHITE, "ERROR: Your not Admin");
ShowPlayerDialog(playerid, 1, DIALOG_STYLE_LIST, "Select your Weapons", "SMG-AK47-Grenades\nTec9-M4-Chainsaw\nMicroSMG-Shotgun-Knife\nAdmins\nVip's", "Choose", "No Weaps");
}
case 4: // The third item listed
{
if(IsPlayerVipMember(playerid))
{
ShowPlayerDialog(playerid, 2, DIALOG_STYLE_LIST, "Vip Weapons", "MicroSMG-Sawnoff-Sniper\nTec9-Sawnoff-Sniper\nCombatShotgun-Sawnoff-Knife", "Choose", "No Weaps");
}
else SendClientMessage(playerid, COLOR_WHITE, "ERROR: Your not a Vip Member!");
ShowPlayerDialog(playerid, 1, DIALOG_STYLE_LIST, "Select your Weapons", "SMG-AK47-Grenades\nTec9-M4-Chainsaw\nMicroSMG-Shotgun-Knife\nAdmins\nVip's", "Choose", "No Weaps");
}
}
}
}
}
return 1;
}
public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
{
if(response)// They pressed the first button.
{
switch(dialogid)// If you only have one dialog, then this isn't required, but it's neater for when you implement more dialogs.
{
case 2:// Our dialog!ShowPlayerDialog(playerid, 1, DIALOG_STYLE_LIST, "Select your Weapons", "SMG-AK47-Grenades\ //Tec9-M4-Chainsaw\MicroSMG-Shotgun-Knife", "Choose");
{
switch(listitem)// Checking which listitem was selected
{
case 0:// The first item listed
{
GivePlayerWeapon( playerid, 28,1500);
GivePlayerWeapon( playerid, 26,100);
GivePlayerWeapon( playerid, 34,100);
weapon[playerid]=5;
TogglePlayerControllable(playerid,true);
}
case 1: // The second item listed
{
GivePlayerWeapon( playerid, 32,1500);
GivePlayerWeapon( playerid, 26,100);
GivePlayerWeapon( playerid, 34,100);
weapon[playerid]=6;
TogglePlayerControllable(playerid,true);
}
case 2: // The third item listed
{
GivePlayerWeapon( playerid, 27,150);
GivePlayerWeapon( playerid, 26,100);
GivePlayerWeapon( playerid, 4,1);
weapon[playerid]=7;
TogglePlayerControllable(playerid,true);
}
}
}
}
}
return 1;
}
public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
{
if(response)// They pressed the first button.
{
switch(dialogid)// If you only have one dialog, then this isn't required, but it's neater for when you implement more dialogs.
{
case 3:// Our dialog!ShowPlayerDialog(playerid, 1, DIALOG_STYLE_LIST, "Select your Weapons", "SMG-AK47-Grenades\ //Tec9-M4-Chainsaw\MicroSMG-Shotgun-Knife", "Choose");
{
switch(listitem)// Checking which listitem was selected
{
case 0:// The first item listed
{
GivePlayerWeapon( playerid, 28,9999);
GivePlayerWeapon( playerid, 26,9999);
GivePlayerWeapon( playerid, 34,9999);
weapon[playerid]=8;
TogglePlayerControllable(playerid,true);
}
case 1: // The second item listed
{
GivePlayerWeapon( playerid, 32,9999);
GivePlayerWeapon( playerid, 26,9999);
GivePlayerWeapon( playerid, 34,9999);
weapon[playerid]=9;
TogglePlayerControllable(playerid,true);
}
case 2: // The third item listed
{
GivePlayerWeapon( playerid, 27,9999);
GivePlayerWeapon( playerid, 26,9999);
GivePlayerWeapon( playerid, 4,1);
weapon[playerid]=10;
TogglePlayerControllable(playerid,true);
}
}
}
}
}
return 1;
}