Another dialog help... - Printable Version
+- SA-MP Forums Archive (
https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (
https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (
https://sampforum.blast.hk/forumdisplay.php?fid=12)
+---- Forum: Help Archive (
https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: Another dialog help... (
/showthread.php?tid=111191)
Another dialog help... -
WardenCS - 30.11.2009
Hello,i got problem,i did everything i could,but i get 26 errors still :S and i think somewhere is bracket missing:S someone help.thanks
pawn Код:
public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
{
if(dialogid == 1434)
{
if(response)
{
if(listitem == 0)
{
if GetPlayerMoney(playerid) > 1199)
{
SafeGivePlayerMoney(playerid, - 1200);
SafeGivePlayerWeapon(i, 24, 50);
SendClientMessage(playerid, COLOR_GRAD4, "Deagle Purcashed");
OnPlayerUpdate(playerid);
}
if(listitem == 1)
{
if GetPlayerMoney(playerid) > 1499)
{
SafeGivePlayerMoney(playerid, - 1500);
SafeGivePlayerWeapon(i, 25, 50);
SendClientMessage(playerid, COLOR_GRAD4, "Shotgun Purcashed");
OnPlayerUpdate(playerid);
}
if(listitem == 2)
{
if GetPlayerMoney(playerid) > 499)
{
SafeGivePlayerMoney(playerid, - 500);
SafeGivePlayerWeapon(i, 5, 1);
SendClientMessage(playerid, COLOR_GRAD4, "BaseBall Bat Purcashed");
OnPlayerUpdate(playerid);
}
if(listitem == 3)
{
SetPlayerPos(playerid,1367.3710,-1280.1479,13.5469);
return 1;
}
}
}
return 1;
}
Re: Another dialog help... -
Marcel - 30.11.2009
Give me a few minutes to fix it.
pawn Код:
public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
{
if(dialogid == 1434)
{
if(response)
{
if(listitem == 0)
{
if GetPlayerMoney(playerid) > 1199)
{
SafeGivePlayerMoney(playerid, - 1200);
SafeGivePlayerWeapon(i, 24, 50);
SendClientMessage(playerid, COLOR_GRAD4, "Deagle Purcashed");
OnPlayerUpdate(playerid);
}
}
if(listitem == 1)
{
if GetPlayerMoney(playerid) > 1499)
{
SafeGivePlayerMoney(playerid, - 1500);
SafeGivePlayerWeapon(i, 25, 50);
SendClientMessage(playerid, COLOR_GRAD4, "Shotgun Purcashed");
OnPlayerUpdate(playerid);
}
}
if(listitem == 2)
{
if GetPlayerMoney(playerid) > 499)
{
SafeGivePlayerMoney(playerid, - 500);
SafeGivePlayerWeapon(i, 5, 1);
SendClientMessage(playerid, COLOR_GRAD4, "BaseBall Bat Purcashed");
OnPlayerUpdate(playerid);
}
}
if(listitem == 3)
{
SetPlayerPos(playerid,1367.3710,-1280.1479,13.5469);
return 1;
}
}
}
return 1;
}
Re: Another dialog help... -
WardenCS - 30.11.2009
Thanks dude