06.11.2014, 14:55
Hello why not working this dialog system for la rp amx
PHP код:
public OnPlayerSpawn(playerid)
{
ShowPlayerDialog(playerid,12,DIALOG_STYLE_LIST,"Airchiet Damxmare Dzala","Dzala 1:Rambo Style\nDzala 2:Tank +50 Score\nDzala 3:Sniper+100 Score\nDzala 4:Boomer Man+150 Score\nDzala 5:Advanced Rambo Style +200Score\nDzala 6:Advanced Tank +250 Score\nDzala 7:Advanced Boomer Man +300 Score","Select","Cancel");
return 1;
}
PHP код:
public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
{
if(response)
{
if(dialogid == 12)
{
if(listitem == 0)
{
ShowPlayerDialog(playerid, 1, DIALOG_STYLE_MSGBOX, "{FF3300} >Informacia<", "{33FFCC}Health:100%\nArmour:15%\nSpecialuri Dzala:Bevri Iaragebi\nIaragi 1:Desert Eagle\nIaragi 2:Tec9\nIaragi 3:Shotgun\nIaragi 4:M4","OK","Cancel");
GiveClassRambo(playerid);
}
if(listitem == 1)
{
if(GetPlayerScore(playerid) < 50) return ShowPlayerDialog(playerid, 1, DIALOG_STYLE_MSGBOX, "{FF3300} >Shecdoma<", "{33FFCC} Tqven AR Gaqvt Sakmarisi Score","OK","Cancel");
ShowPlayerDialog(playerid, 1, DIALOG_STYLE_MSGBOX, "{FF3300} >Informacia<", "{33FFCC}Health:150%\nArmour:150%\nSpecialuri Dzala:Tank\nIaragi 1:Desert Eagle\nIaragi 2:Shotgun","OK","Cancel");
GiveClassTank(playerid);
}
if(listitem == 2)
{
if(GetPlayerScore(playerid) < 100) return ShowPlayerDialog(playerid, 1, DIALOG_STYLE_MSGBOX, "{FF3300} >Shecdoma<", "{33FFCC} Tqven AR Gaqvt Sakmarisi Score","OK","Cancel");
ShowPlayerDialog(playerid, 1, DIALOG_STYLE_MSGBOX, "{FF3300} >Informacia<", "{33FFCC}Health:70%\nArmour:0%\nSpecialuri Dzala:Crazy Sniper\nIaragi 1:Sniper Rifle","OK","Cancel");
GiveClassSniper(playerid);
}
if(listitem == 3)
{
if(GetPlayerScore(playerid) < 150) return ShowPlayerDialog(playerid, 1, DIALOG_STYLE_MSGBOX, "{FF3300} >Shecdoma<", "{33FFCC} Tqven AR Gaqvt Sakmarisi Score","OK","Cancel");
ShowPlayerDialog(playerid, 1, DIALOG_STYLE_MSGBOX, "{FF3300} >Informacia<", "{33FFCC}Health:100%\nArmour:0%\nSpecialuri Dzala:Tito Tyvia Tito Afetqeba\nIaragi 1:Country Rifle","OK","Cancel");
GiveClassBoomer(playerid);
}
if(listitem == 4)
{
if(GetPlayerScore(playerid) < 200) return ShowPlayerDialog(playerid, 1, DIALOG_STYLE_MSGBOX, "{FF3300} >Shecdoma<", "{33FFCC} Tqven AR Gaqvt Sakmarisi Score","OK","Cancel");
ShowPlayerDialog(playerid, 1, DIALOG_STYLE_MSGBOX, "{FF3300} >Informacia<", "{33FFCC}Health:100%\nArmour:35%\nSpecialuri Dzala:Gadzlierebuli Iaragebi\nIaragi 1:Desert Eagle\nIaragi 2:Sawnoff Shotgun\nIaragi 3:Combat Shotgun\nIaragi 4:M4","OK","Cancel");
GiveClassAdvRambo(playerid);
}
if(listitem == 5)
{
if(GetPlayerScore(playerid) < 250) return ShowPlayerDialog(playerid, 1, DIALOG_STYLE_MSGBOX, "{FF3300} >Shecdoma<", "{33FFCC} Tqven AR Gaqvt Sakmarisi Score","OK","Cancel");
ShowPlayerDialog(playerid, 1, DIALOG_STYLE_MSGBOX, "{FF3300} >Informacia<", "{33FFCC}Health:150%\nArmour:150%\nSpecialuri Dzala:Sicocxlis Regenitacia\nIaragi 1:Desert Eagle\nIaragi 2:Shotgun","OK","Cancel");
GiveClassAdvTank(playerid);
}
if(listitem == 6)
{
if(GetPlayerScore(playerid) < 300) return ShowPlayerDialog(playerid, 1, DIALOG_STYLE_MSGBOX, "{FF3300} >Shecdoma<", "{33FFCC} Tqven AR Gaqvt Sakmarisi Score","OK","Cancel");
ShowPlayerDialog(playerid, 1, DIALOG_STYLE_MSGBOX, "{FF3300} >Informacia<", "{33FFCC}Health:100%\nArmour:15%\nSpecialuri Dzala:Tito Tyvia Tito Afetqeba\nIaragi 1:Silenced 9mm","OK","Cancel");
GiveClassAdvBoomer(playerid);
}
}
}
return 1;
}