ShowPlayerDialog bug!
#1

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;
}
Reply
#2

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;
}
Reply
#3

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","");
Reply
#4

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;
}
Reply
#5

tnx helping me xD
Reply
#6

-_- 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","");
Reply
#7

Slight mistake. Please accept my apologies.

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


Forum Jump:


Users browsing this thread: 1 Guest(s)