08.08.2011, 17:03
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, 15,DIALOG_STYLE_LIST,"Menu de Armas","Eagle\nSniper\nKnife\nGranade\nCombat Shotgun\nAK-47\nBazuca\nMinugin","OK","");
}
if(listitem == 4)
{
ShowPlayerDialog(playerid, 4,DIALOG_STYLE_LIST,"Menu de Cores","Azul Fraco\nRosa\nVermelho\nVerde\nRoxo\nLaranja\nRosa Fraco\nAmarelo","OK","");
}
return true;
}
return true;
}
if(dialogid == 4) //
{
if(response)
{
if(listitem == 4)
{
ShowPlayerDialog(playerid, 4,DIALOG_STYLE_LIST,"Menu de Cores","Azul Fraco\nRosa\nVermelho\nVerde\nRoxo\nLaranja\nRosa Fraco\nAmarelo","OK","");
}
}
}
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 == 3)
{
ShowPlayerDialog(playerid, 15,DIALOG_STYLE_LIST,"Menu de Armas","Eagle\nSniper\nKnife\nGranade\nCombat Shotgun\nAK-47\nBazuca\nMinugin","OK","");
}
}
}
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", "");
}
if(dialogid == 0)
{
if(response)
{
GivePlayerWeapon(playerid, EscolheuArma[playerid], strval(inputtext));
GivePlayerMoney(playerid, -strval(inputtext),3);
}
}
if(dialogid == 1)
{
if(response)
{
GivePlayerWeapon(playerid, EscolheuArma[playerid], strval(inputtext));
GivePlayerMoney(playerid, -strval(inputtext),7);
}
}
if(dialogid == 2)
{
if(response)
{
GivePlayerWeapon(playerid, EscolheuArma[playerid], strval(inputtext));
GivePlayerMoney(playerid, -strval(inputtext),1);
}
}
if(dialogid == 3)
return 1;
{
if(response)
{
GivePlayerWeapon(playerid, EscolheuArma[playerid], strval(inputtext));
GivePlayerMoney(playerid, -strval(inputtext),4);
}
}
if(dialogid == 4)
{
if(response)
{
GivePlayerWeapon(playerid, EscolheuArma[playerid], strval(inputtext));
GivePlayerMoney(playerid, -strval(inputtext),5);
}
}
if(dialogid == 5)
{
if(response)
{
GivePlayerWeapon(playerid, EscolheuArma[playerid], strval(inputtext));
GivePlayerMoney(playerid, -strval(inputtext),5);
}
}
if(dialogid == 6)
{
if(response)
{
GivePlayerWeapon(playerid, EscolheuArma[playerid], strval(inputtext));
GivePlayerMoney(playerid, -strval(inputtext),2);
}
}
if(dialogid == 7)
{
if(response)
{
GivePlayerWeapon(playerid, EscolheuArma[playerid], strval(inputtext));
GivePlayerMoney(playerid, -strval(inputtext),1);
}
}
return 0;
}
pawn Код:
public OnPlayerText(playerid, text[])
{
return 1;
}
public OnPlayerCommandText(playerid, cmdtext[])
if(!strcmp("/civil", cmdtext, true))
{
ShowPlayerDialog(playerid,1234,DIALOG_STYLE_LIST,"{FF1AD0}sistema","{FF1AD0}Vida\n{FF1AD0}Colete\n{FF1AD0}Vida e Colete\n{FF1AD0}Armas\nCor no Nome","Comprar","Cancelar");
return 1;
}
isso й tudo