08.08.2011, 17:26
pawn Код:
public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
{
if(dialogid == 1234)
{
if(response)
{
if(listitem == 0)
{
SetPlayerHealth(playerid, 100.0);
GivePlayerMoney(playerid, 3000000);
}
if(listitem == 1)
{
SetPlayerArmour(playerid, 100.0);
GivePlayerMoney(playerid, 3000000);
}
if(listitem == 2)
{
SetPlayerArmour(playerid, 100.0);
SetPlayerHealth(playerid, 100.0);
GivePlayerMoney(playerid, 3000000);
}
if(listitem == 3)
{
ShowPlayerDialog(playerid, 123,DIALOG_STYLE_LIST,"Menu de Armas","Eagle\nSniper\nKnife\nGranade\nCombat Shotgun\nAK-47\nBazuca\nMinugin","OK","");
}
if(listitem == 4)
{
ShowPlayerDialog(playerid, 41,DIALOG_STYLE_LIST,"Menu de Cores","Azul Fraco\nRosa\nVermelho\nVerde\nRoxo\nLaranja\nRosa Fraco\nAmarelo","OK","");
}
return true;
}
return true;
}
if(dialogid == 41)
{
if(response)
{
if(listitem == 0)
{
SetPlayerColor(playerid,0xa8FFEDAA);
}
if(listitem == 1)
{
SetPlayerColor(playerid,0xFE10FFAA);
}
if(listitem == 2)
{
SetPlayerColor(playerid,0xFF082DAA);
}
if(listitem == 3)
{
SetPlayerColor(playerid,0x00FF00AA);
}
if(listitem == 4)
{
SetPlayerColor(playerid,0x9590FFAA);
}
if(listitem == 5)
{
SetPlayerColor(playerid,0xFF7920AA);
}
if(listitem == 6)
{
SetPlayerColor(playerid,0xFEB0FFAA);
}
if(listitem == 7)
{
SetPlayerColor(playerid,0xFFFE30AA);
}
return true;
}
return true;
}
if(dialogid == 123)
{
if(response)
{
if(listitem == 0)
{
EscolheuArma[playerid] = 24;
ShowPlayerDialog(playerid, 0, DIALOG_STYLE_INPUT, "Nome do dialog", "Digite o tanto de municao", "Ok", "");
}
if(listitem == 1)
{
EscolheuArma[playerid] = 34;
ShowPlayerDialog(playerid, 1, DIALOG_STYLE_INPUT, "Nome do dialog", "Digite o tanto de municao", "Ok", "");
}
if(listitem == 2)
{
EscolheuArma[playerid] = 4;
ShowPlayerDialog(playerid, 2, DIALOG_STYLE_INPUT, "Nome do dialog", "Digite o tanto de municao", "Ok", "");
}
if(listitem == 3)
{
EscolheuArma[playerid] = 16;
ShowPlayerDialog(playerid, 3, DIALOG_STYLE_INPUT, "Nome do dialog", "Digite o tanto de municao", "Ok", "");
}
if(listitem == 4)
{
EscolheuArma[playerid] = 27;
ShowPlayerDialog(playerid, 4, DIALOG_STYLE_INPUT, "Nome do dialog", "Digite o tanto de municao", "Ok", "");
}
if(listitem == 5)
{
EscolheuArma[playerid] = 30;
ShowPlayerDialog(playerid, 5, DIALOG_STYLE_INPUT, "Nome do dialog", "Digite o tanto de municao", "Ok", "");
}
if(listitem == 6)
{
EscolheuArma[playerid] = 36;
ShowPlayerDialog(playerid, 6, DIALOG_STYLE_INPUT, "Nome do dialog", "Digite o tanto de municao", "Ok", "");
}
if(listitem == 7)
{
EscolheuArma[playerid] = 38;
ShowPlayerDialog(playerid, 6, DIALOG_STYLE_INPUT, "Nome do dialog", "Digite o tanto de municao", "Ok", "");
}
}
return true;
}
if(dialogid == 0)
{
if(response)
{
GivePlayerWeapon(playerid, EscolheuArma[playerid], strval(inputtext));
GivePlayerMoney(playerid, -strval(inputtext),3);
}
return true;
}
if(dialogid == 1)
{
if(response)
{
GivePlayerWeapon(playerid, EscolheuArma[playerid], strval(inputtext));
GivePlayerMoney(playerid, -strval(inputtext),7);
}
return true;
}
if(dialogid == 2)
{
if(response)
{
GivePlayerWeapon(playerid, EscolheuArma[playerid], strval(inputtext));
GivePlayerMoney(playerid, -strval(inputtext),1);
}
return true;
}
if(dialogid == 3)
{
if(response)
{
GivePlayerWeapon(playerid, EscolheuArma[playerid], strval(inputtext));
GivePlayerMoney(playerid, -strval(inputtext),4);
}
return true;
}
if(dialogid == 4)
{
if(response)
{
GivePlayerWeapon(playerid, EscolheuArma[playerid], strval(inputtext));
GivePlayerMoney(playerid, -strval(inputtext),5);
}
return true;
}
if(dialogid == 5)
{
if(response)
{
GivePlayerWeapon(playerid, EscolheuArma[playerid], strval(inputtext));
GivePlayerMoney(playerid, -strval(inputtext),5);
}
return true;
}
if(dialogid == 6)
{
if(response)
{
GivePlayerWeapon(playerid, EscolheuArma[playerid], strval(inputtext));
GivePlayerMoney(playerid, -strval(inputtext),2);
}
return true;
}
if(dialogid == 7)
{
if(response)
{
GivePlayerWeapon(playerid, EscolheuArma[playerid], strval(inputtext));
GivePlayerMoney(playerid, -strval(inputtext),1);
}
return true;
}
return true;
}