30.07.2010, 17:35
duv e pq quando coloco ele no ondialog o gm nao compila .-.
public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
{
if(dialogid==IDMENU)
{
if(response)
{
if(listitem==0)
{
if(GetPlayerMoney(playerid)<VPISTOL) return SendClientMessage(playerid,vermelho,SDinheiro);
else {ShowPlayerDialog(playerid,PISTOL,DIALOG_STYLE_INP UT,TextoC1,MSGComprar,Btn1,Btn2);}
return 1;}
if(listitem==1)
{
if(GetPlayerMoney(playerid)<VDESERT) return SendClientMessage(playerid,vermelho,SDinheiro);
else {ShowPlayerDialog(playerid,DESERT,DIALOG_STYLE_INP UT,TextoC2,MSGComprar,Btn1,Btn2);}
return 1;}
if(listitem==2)
{
if(GetPlayerMoney(playerid)<VSHOT) return SendClientMessage(playerid,vermelho,SDinheiro);
else {ShowPlayerDialog(playerid,SHOT,DIALOG_STYLE_INPUT ,TextoC3,MSGComprar,Btn1,Btn2);}
return 1;}
if(listitem==3)
{
if(GetPlayerMoney(playerid)<VMP5) return SendClientMessage(playerid,vermelho,SDinheiro);
else {ShowPlayerDialog(playerid,MP5,DIALOG_STYLE_INPUT, TextoC4,MSGComprar,Btn1,Btn2);}
return 1;}
if(listitem==4)
{
if(GetPlayerMoney(playerid)<VRIFLE) return SendClientMessage(playerid,vermelho,SDinheiro);
else {ShowPlayerDialog(playerid,RIFLE,DIALOG_STYLE_INPU T,TextoC5,MSGComprar,Btn1,Btn2);}
return 1;}
if(listitem==5)
{
if(GetPlayerMoney(playerid)<VAK) return SendClientMessage(playerid,vermelho,SDinheiro);
else {ShowPlayerDialog(playerid,AK,DIALOG_STYLE_INPUT,T extoC8,MSGComprar,Btn1,Btn2);}
return 1;}
if(listitem==6)
{
if(GetPlayerMoney(playerid)<VCOLT) return SendClientMessage(playerid,vermelho,SDinheiro);
else {ShowPlayerDialog(playerid,COLT,DIALOG_STYLE_INPUT ,TextoC9,MSGComprar,Btn1,Btn2);}
return 1;}
if(listitem==7)
{
if(GetPlayerMoney(playerid)<VSNIPER) return SendClientMessage(playerid,vermelho,SDinheiro);
else {ShowPlayerDialog(playerid,SNIPER,DIALOG_STYLE_INP UT,TextoC10,MSGComprar,Btn1,Btn2);}
return 1;}
if(listitem==![Cool](images/smilies/cool.gif)
{
if(GetPlayerMoney(playerid)<VEXTIN) return SendClientMessage(playerid,vermelho,SDinheiro);
else {ShowPlayerDialog(playerid,EXTIN,DIALOG_STYLE_INPU T,TextoC11,MSGComprar,Btn1,Btn2);}
return 1;}}
return 1;
}
if(dialogid==SHOT)
{
if(response)
{
new BalasP=strval(inputtext)*PSHOT+VSHOT;
if(GetPlayerMoney(playerid)<BalasP) return SendClientMessage(playerid,vermelho,SBDinheiro);
else {GivePlayerMoneyEx(playerid,-(BalasP));GivePlayerWeapon(playerid,25,strval(inpu ttext));SendClientMessage(playerid,amarelo,MSGSuce sso);}}
return 1;
}
if(dialogid==MP5)
{
if(response)
{
new BalasP=strval(inputtext)*PMP5+VMP5;
if(GetPlayerMoney(playerid)<BalasP) return SendClientMessage(playerid,vermelho,SBDinheiro);
else {GivePlayerMoneyEx(playerid,-(BalasP));GivePlayerWeapon(playerid,29,strval(inpu ttext));SendClientMessage(playerid,amarelo,MSGSuce sso);}}
return 1;
}
if(dialogid==PISTOL)
{
if(response)
{
new BalasP=strval(inputtext)*PPISTOL+VPISTOL;
if(GetPlayerMoney(playerid)<BalasP) return SendClientMessage(playerid,vermelho,SBDinheiro);
else {GivePlayerMoneyEx(playerid,-(BalasP));GivePlayerWeapon(playerid,22,strval(inpu ttext));SendClientMessage(playerid,amarelo,MSGSuce sso);}}
return 1;
}
if(dialogid==DESERT)
{
if(response)
{
new BalasP=strval(inputtext)*PDESERT+VDESERT;
if(GetPlayerMoney(playerid)<BalasP) return SendClientMessage(playerid,vermelho,SBDinheiro);
else {GivePlayerMoneyEx(playerid,-(BalasP));GivePlayerWeapon(playerid,24,strval(inpu ttext));SendClientMessage(playerid,amarelo,MSGSuce sso);}}
return 1;
}
if(dialogid==RIFLE)
{
if(response)
{
new BalasP=strval(inputtext)*PRIFLE+VRIFLE;
if(GetPlayerMoney(playerid)<BalasP) return SendClientMessage(playerid,vermelho,SBDinheiro);
else {GivePlayerMoneyEx(playerid,-(BalasP));GivePlayerWeapon(playerid,33,strval(inpu ttext));SendClientMessage(playerid,amarelo,MSGSuce sso);}}
return 1;
}
if(dialogid==AK)
{
if(response)
{
new BalasP=strval(inputtext)*PAK+VAK;
if(GetPlayerMoney(playerid)<BalasP) return SendClientMessage(playerid,vermelho,SBDinheiro);
else {GivePlayerMoneyEx(playerid,-(BalasP));GivePlayerWeapon(playerid,30,strval(inpu ttext));SendClientMessage(playerid,amarelo,MSGSuce sso);}}
return 1;
}
if(dialogid==COLT)
{
if(response)
{
new BalasP=strval(inputtext)*PCOLT+VCOLT;
if(GetPlayerMoney(playerid)<BalasP) return SendClientMessage(playerid,vermelho,SBDinheiro);
else {GivePlayerMoneyEx(playerid,-(BalasP));GivePlayerWeapon(playerid,31,strval(inpu ttext));SendClientMessage(playerid,amarelo,MSGSuce sso);}}
return 1;
}
if(dialogid==SNIPER)
{
if(response)
{
new BalasP=strval(inputtext)*PSNIPER+VSNIPER;
if(GetPlayerMoney(playerid)<BalasP) return SendClientMessage(playerid,vermelho,SBDinheiro);
else {GivePlayerMoneyEx(playerid,-(BalasP));GivePlayerWeapon(playerid,34,strval(inpu ttext));SendClientMessage(playerid,amarelo,MSGSuce sso);}}
return 1;
}
if(dialogid==EXTIN)
{
if(response)
{
new BalasP=strval(inputtext)*PEXTIN+VEXTIN;
if(GetPlayerMoney(playerid)<BalasP) return SendClientMessage(playerid,vermelho,SBDinheiro);
else {GivePlayerMoneyEx(playerid,-(BalasP));GivePlayerWeapon(playerid,ID_Arma11,strv al(inputtext));SendClientMessage(playerid,amarelo, MSGSucesso);}}
return 1;
}
return 1;
}
public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
{
if(dialogid==IDMENU)
{
if(response)
{
if(listitem==0)
{
if(GetPlayerMoney(playerid)<VPISTOL) return SendClientMessage(playerid,vermelho,SDinheiro);
else {ShowPlayerDialog(playerid,PISTOL,DIALOG_STYLE_INP UT,TextoC1,MSGComprar,Btn1,Btn2);}
return 1;}
if(listitem==1)
{
if(GetPlayerMoney(playerid)<VDESERT) return SendClientMessage(playerid,vermelho,SDinheiro);
else {ShowPlayerDialog(playerid,DESERT,DIALOG_STYLE_INP UT,TextoC2,MSGComprar,Btn1,Btn2);}
return 1;}
if(listitem==2)
{
if(GetPlayerMoney(playerid)<VSHOT) return SendClientMessage(playerid,vermelho,SDinheiro);
else {ShowPlayerDialog(playerid,SHOT,DIALOG_STYLE_INPUT ,TextoC3,MSGComprar,Btn1,Btn2);}
return 1;}
if(listitem==3)
{
if(GetPlayerMoney(playerid)<VMP5) return SendClientMessage(playerid,vermelho,SDinheiro);
else {ShowPlayerDialog(playerid,MP5,DIALOG_STYLE_INPUT, TextoC4,MSGComprar,Btn1,Btn2);}
return 1;}
if(listitem==4)
{
if(GetPlayerMoney(playerid)<VRIFLE) return SendClientMessage(playerid,vermelho,SDinheiro);
else {ShowPlayerDialog(playerid,RIFLE,DIALOG_STYLE_INPU T,TextoC5,MSGComprar,Btn1,Btn2);}
return 1;}
if(listitem==5)
{
if(GetPlayerMoney(playerid)<VAK) return SendClientMessage(playerid,vermelho,SDinheiro);
else {ShowPlayerDialog(playerid,AK,DIALOG_STYLE_INPUT,T extoC8,MSGComprar,Btn1,Btn2);}
return 1;}
if(listitem==6)
{
if(GetPlayerMoney(playerid)<VCOLT) return SendClientMessage(playerid,vermelho,SDinheiro);
else {ShowPlayerDialog(playerid,COLT,DIALOG_STYLE_INPUT ,TextoC9,MSGComprar,Btn1,Btn2);}
return 1;}
if(listitem==7)
{
if(GetPlayerMoney(playerid)<VSNIPER) return SendClientMessage(playerid,vermelho,SDinheiro);
else {ShowPlayerDialog(playerid,SNIPER,DIALOG_STYLE_INP UT,TextoC10,MSGComprar,Btn1,Btn2);}
return 1;}
if(listitem==
![Cool](images/smilies/cool.gif)
{
if(GetPlayerMoney(playerid)<VEXTIN) return SendClientMessage(playerid,vermelho,SDinheiro);
else {ShowPlayerDialog(playerid,EXTIN,DIALOG_STYLE_INPU T,TextoC11,MSGComprar,Btn1,Btn2);}
return 1;}}
return 1;
}
if(dialogid==SHOT)
{
if(response)
{
new BalasP=strval(inputtext)*PSHOT+VSHOT;
if(GetPlayerMoney(playerid)<BalasP) return SendClientMessage(playerid,vermelho,SBDinheiro);
else {GivePlayerMoneyEx(playerid,-(BalasP));GivePlayerWeapon(playerid,25,strval(inpu ttext));SendClientMessage(playerid,amarelo,MSGSuce sso);}}
return 1;
}
if(dialogid==MP5)
{
if(response)
{
new BalasP=strval(inputtext)*PMP5+VMP5;
if(GetPlayerMoney(playerid)<BalasP) return SendClientMessage(playerid,vermelho,SBDinheiro);
else {GivePlayerMoneyEx(playerid,-(BalasP));GivePlayerWeapon(playerid,29,strval(inpu ttext));SendClientMessage(playerid,amarelo,MSGSuce sso);}}
return 1;
}
if(dialogid==PISTOL)
{
if(response)
{
new BalasP=strval(inputtext)*PPISTOL+VPISTOL;
if(GetPlayerMoney(playerid)<BalasP) return SendClientMessage(playerid,vermelho,SBDinheiro);
else {GivePlayerMoneyEx(playerid,-(BalasP));GivePlayerWeapon(playerid,22,strval(inpu ttext));SendClientMessage(playerid,amarelo,MSGSuce sso);}}
return 1;
}
if(dialogid==DESERT)
{
if(response)
{
new BalasP=strval(inputtext)*PDESERT+VDESERT;
if(GetPlayerMoney(playerid)<BalasP) return SendClientMessage(playerid,vermelho,SBDinheiro);
else {GivePlayerMoneyEx(playerid,-(BalasP));GivePlayerWeapon(playerid,24,strval(inpu ttext));SendClientMessage(playerid,amarelo,MSGSuce sso);}}
return 1;
}
if(dialogid==RIFLE)
{
if(response)
{
new BalasP=strval(inputtext)*PRIFLE+VRIFLE;
if(GetPlayerMoney(playerid)<BalasP) return SendClientMessage(playerid,vermelho,SBDinheiro);
else {GivePlayerMoneyEx(playerid,-(BalasP));GivePlayerWeapon(playerid,33,strval(inpu ttext));SendClientMessage(playerid,amarelo,MSGSuce sso);}}
return 1;
}
if(dialogid==AK)
{
if(response)
{
new BalasP=strval(inputtext)*PAK+VAK;
if(GetPlayerMoney(playerid)<BalasP) return SendClientMessage(playerid,vermelho,SBDinheiro);
else {GivePlayerMoneyEx(playerid,-(BalasP));GivePlayerWeapon(playerid,30,strval(inpu ttext));SendClientMessage(playerid,amarelo,MSGSuce sso);}}
return 1;
}
if(dialogid==COLT)
{
if(response)
{
new BalasP=strval(inputtext)*PCOLT+VCOLT;
if(GetPlayerMoney(playerid)<BalasP) return SendClientMessage(playerid,vermelho,SBDinheiro);
else {GivePlayerMoneyEx(playerid,-(BalasP));GivePlayerWeapon(playerid,31,strval(inpu ttext));SendClientMessage(playerid,amarelo,MSGSuce sso);}}
return 1;
}
if(dialogid==SNIPER)
{
if(response)
{
new BalasP=strval(inputtext)*PSNIPER+VSNIPER;
if(GetPlayerMoney(playerid)<BalasP) return SendClientMessage(playerid,vermelho,SBDinheiro);
else {GivePlayerMoneyEx(playerid,-(BalasP));GivePlayerWeapon(playerid,34,strval(inpu ttext));SendClientMessage(playerid,amarelo,MSGSuce sso);}}
return 1;
}
if(dialogid==EXTIN)
{
if(response)
{
new BalasP=strval(inputtext)*PEXTIN+VEXTIN;
if(GetPlayerMoney(playerid)<BalasP) return SendClientMessage(playerid,vermelho,SBDinheiro);
else {GivePlayerMoneyEx(playerid,-(BalasP));GivePlayerWeapon(playerid,ID_Arma11,strv al(inputtext));SendClientMessage(playerid,amarelo, MSGSucesso);}}
return 1;
}
return 1;
}