Timer 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: Timer Help (
/showthread.php?tid=226267)
Timer Help -
Sepelin - 15.02.2011
How can i set a timer.
PHP код:
{
new name[MAX_PLAYER_NAME];
new name2[MAX_PLAYER_NAME];
GetPlayerName(giveplayerid, name2, sizeof(name2));
GetPlayerName(playerid, name, sizeof(name));
ApplyAnimation(playerid, "DEALER", "DEALER_DEAL", 4.0, 0, 0, 0, 0, 0); // Deal
format(string, sizeof(string), "%s Attempt to pickpocket %s", name, name2);
SendClientMessage(playerid, COLOR_PURPLE, string);
// Want The timer here on 2 seconds so it stops here and count to 2 and continue to ShowPlayerDialog
ShowPlayerDialog(playerid, 680, DIALOG_STYLE_LIST, "PickPocket", "Cash\nCrack\nPot\nMaterials", "Select", "Cancel");
return 1;
}
Re: Timer Help -
UDV Production - 15.02.2011
PHP код:
new name[MAX_PLAYER_NAME];
new name2[MAX_PLAYER_NAME];
GetPlayerName(giveplayerid, name2, sizeof(name2));
GetPlayerName(playerid, name, sizeof(name));
ApplyAnimation(playerid, "DEALER", "DEALER_DEAL", 4.0, 0, 0, 0, 0, 0); // Deal
format(string, sizeof(string), "%s Attempt to pickpocket %s", name, name2)
SendClientMessage(playerid, COLOR_PURPLE, string);
SetTimer( "dialog", 2000, 0);
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");
}
}