SA-MP Forums Archive
ShowPlayerDialog bug! - 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)
+--- Thread: ShowPlayerDialog bug! (/showthread.php?tid=434178)



ShowPlayerDialog bug! - Guest123 - 01.05.2013

i have some bug about ShowPlayerDialog

after i go to the checkpoint,

it show

pawn Код:
ShowPlayerDialog(playerid,1946,DIALOG_STYLE_MSGBOX,"{FFA1A1}Mapping Center","{F81414}You Was bought License To Mapping :D" ,"OKAY","");



and after i go to the checkpoint again



but it show

pawn Код:
ShowPlayerDialog(playerid,1946,DIALOG_STYLE_MSGBOX,"{FFA1A1}Mapping Center","{F81414}You Was bought License To Mapping :D:" ,"OKAY","");
i want it show
pawn Код:
ShowPlayerDialog(playerid,1946,DIALOG_STYLE_MSGBOX,"{FFA1A1}Mapping Center","{F81414}you already bought license to mapping, use /co to mapping D:" ,"OKAY","");


Code

pawn Код:
public OnPlayerEnterCheckpoint(playerid)
{
if(IsPlayerInRangeOfPoint(playerid, 1.0, 1019.2029,2376.1060,10.8203))
 {
  if(PlayerMap[playerid] == 0)
    {
    ShowPlayerDialog(playerid,1946,DIALOG_STYLE_MSGBOX,"{FFA1A1}Mapping Center","{F81414}you already bought license to mapping, use /co to mapping D:" ,"OKAY","");
    }
    ShowPlayerDialog(playerid,1945,DIALOG_STYLE_MSGBOX,"{FFA1A1}Mapping Center","{F81414}You Was bought License To Mapping :D" ,"OKAY","");
    GivePlayerMoney(playerid, -250000);
    PlayerMap[playerid] = 1;
    return 1;
   }
  return 0;
}



Re: ShowPlayerDialog bug! - SimpalK - 01.05.2013

use this :-
pawn Код:
public OnPlayerEnterCheckpoint(playerid)
{
  if(IsPlayerInRangeOfPoint(playerid, 1.0, 1019.2029,2376.1060,10.8203))
  {
    if(PlayerMap[playerid] == 0)
    {
        ShowPlayerDialog(playerid,1945,DIALOG_STYLE_MSGBOX,"{FFA1A1}Mapping Center","{F81414}You Was bought License To Mapping :D" ,"OKAY","");
        GivePlayerMoney(playerid, -250000);
        PlayerMap[playerid] = 1;
    }
    if(PlayerMap[playerid] == 1)
    {
     ShowPlayerDialog(playerid,1946,DIALOG_STYLE_MSGBOX,"{FFA1A1}Mapping Center","{F81414}you already bought license to mapping, use /co to mapping D:" ,"OKAY","");
    }
    return 1;
   }
  return 0;
}



Re: ShowPlayerDialog bug! - Guest123 - 01.05.2013

and if i want put this ..

pawn Код:
if(GetPlayerMoney(playerid) < 250000)
and will show

pawn Код:
ShowPlayerDialog(playerid,1945,DIALOG_STYLE_MSGBOX,"{FFA1A1}Mapping Center","{F81414}must have at least $250000$ cash to buy this.." ,"OKAY","");



Re: ShowPlayerDialog bug! - Slix_ - 01.05.2013

pawn Код:
public OnPlayerEnterCheckpoint(playerid)
{
  if(IsPlayerInRangeOfPoint(playerid, 1.0, 1019.2029,2376.1060,10.8203))
  {
    if(PlayerMap[playerid] == 0)
    {
        if(GetPlayerMoney(playerid) < 250000) {
        ShowPlayerDialog(playerid,1945,DIALOG_STYLE_MSGBOX,"{FFA1A1}Mapping Center","{F81414}You Was bought License To Mapping :D" ,"OKAY","");
        GivePlayerMoney(playerid, -250000);
        PlayerMap[playerid] = 1;
        }
        else {
             ShowPlayerDialog(playerid,1945,DIALOG_STYLE_MSGBOX,"{FFA1A1}Mapping Center","{F81414}must have at least $250000$ cash to buy this.." ,"OKAY","");
        }
    }
    if(PlayerMap[playerid] == 1)
    {
     ShowPlayerDialog(playerid,1946,DIALOG_STYLE_MSGBOX,"{FFA1A1}Mapping Center","{F81414}you already bought license to mapping, use /co to mapping D:" ,"OKAY","");
    }
    return 1;
   }
  return 0;
}



Re: ShowPlayerDialog bug! - Guest123 - 01.05.2013

tnx helping me xD


Re: ShowPlayerDialog bug! - Guest123 - 01.05.2013

-_- my money 0 and show


pawn Код:
ShowPlayerDialog(playerid,1946,DIALOG_STYLE_MSGBOX,"{FFA1A1}Mapping Center","{F81414}you already bought license to mapping, use /co to mapping D:" ,"OKAY","");



Re: ShowPlayerDialog bug! - Slix_ - 01.05.2013

Slight mistake. Please accept my apologies.

Replace:
pawn Код:
if(GetPlayerMoney(playerid) < 250000) {
With:
pawn Код:
if(GetPlayerMoney(playerid) >= 250000) {