Timer does not respond - 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: Timer does not respond (
/showthread.php?tid=456053)
Timer does not respond -
benel1 - 04.08.2013
Hello ..
This is my code:
pawn Код:
if(dialogid == DIALOG_TO_RULES && response)
  {
    ShowPlayerDialog(playerid, DIALOG_RULE_1, DIALOG_STYLE_MSGBOX, ""yellow"חוקי השרת", ""orange"חוק מספר: 1 - כותרת החוק\n\n"red"החוק", "המשך", "");
    pI[playerid][SeeRule] = 1;
    pI[playerid][RegisterTimer] = SetTimerEx("ChangeRule", 3900, true, "i", playerid);
    return true;
  }
    if(dialogid == DIALOG_RULE_1 && response)
  {
    GameTextForPlayer(playerid, "~r~Wait ~g~4 ~r~minutes !", 1000, 3);
    ShowPlayerDialog(playerid, DIALOG_RULE_1, DIALOG_STYLE_MSGBOX, ""yellow"חוקי השרת", ""orange"חוק מספר: 1 - כותרת החוק\n\n"red"החוק", "המשך", "");
    if(pI[playerid][SeeRule] == 2)
    {
      ShowPlayerDialog(playerid, DIALOG_RULE_2, DIALOG_STYLE_MSGBOX, ""yellow"חוקי השרת", ""orange"חוק מספר: 2 - כותרת החוק\n\n"red"החוק", "המשך", "");
    }
    return true;
  }
public ChangeRule(playerid)
{
  if(pI[playerid][SeeRule] == 6) return KillTimer(pI[playerid][RegisterTimer]);
  pI[playerid][SeeRule]++;
  return true;
}
I made a timer that increases the number of the player's Law
But the number does not indicate as though the timer is not responding ..
It always shows me this dialog:
pawn Код:
ShowPlayerDialog(playerid, DIALOG_RULE_1, DIALOG_STYLE_MSGBOX, ""yellow"חוקי השרת", ""orange"חוק מספר: 1 - כותרת החוק\n\n"red"החוק", "המשך", "");
Instead of this dialog (after four seconds the timer increases the number of law):
pawn Код:
ShowPlayerDialog(playerid, DIALOG_RULE_2, DIALOG_STYLE_MSGBOX, ""yellow"חוקי השרת", ""orange"חוק מספר: 2 - כותרת החוק\n\n"red"החוק", "המשך", "");
Thank assistants and sorry for my english