Timer Help
#1

How can i set a timer.

PHP код:
{
                           new 
name[MAX_PLAYER_NAME];
                        new 
name2[MAX_PLAYER_NAME];
                        
GetPlayerName(giveplayeridname2sizeof(name2));
                        
GetPlayerName(playeridnamesizeof(name));
                        
ApplyAnimation(playerid"DEALER""DEALER_DEAL"4.000000); // Deal
                        
format(stringsizeof(string), "%s Attempt to pickpocket %s"namename2);
                        
SendClientMessage(playeridCOLOR_PURPLEstring);
                        
// Want The timer here on 2 seconds so it stops here and count to 2 and continue to ShowPlayerDialog
                         
ShowPlayerDialog(playerid680DIALOG_STYLE_LIST"PickPocket""Cash\nCrack\nPot\nMaterials""Select""Cancel");
                        return 
1;
                    } 
Reply
#2

PHP код:
new name[MAX_PLAYER_NAME];
new 
name2[MAX_PLAYER_NAME];
GetPlayerName(giveplayeridname2sizeof(name2));
GetPlayerName(playeridnamesizeof(name));
ApplyAnimation(playerid"DEALER""DEALER_DEAL"4.000000); // Deal
format(stringsizeof(string), "%s Attempt to pickpocket %s"namename2)
SendClientMessage(playeridCOLOR_PURPLEstring);
SetTimer"dialog"20000);                       
return 
1
And atlast add this

pawn Код:
forward dialog();
    public dialog()
    {
        for(new i=0; i<=MAX_PLAYERS; i++)
        {
            ShowPlayerDialog(playerid, 680, DIALOG_STYLE_LIST, "PickPocket", "Cash\nCrack\nPot\nMaterials", "Select", "Cancel");
        }
    }
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)