SA-MP Forums

Go Back   SA-MP Forums > SA-MP Scripting and Plugins > Scripting Help

Reply
 
Thread Tools Display Modes
Old 15/09/2015, 02:16 PM   #1
karemmahmed22
Big Clucker
 
karemmahmed22's Avatar
 
Join Date: Jun 2015
Location: Mars
Posts: 183
Reputation: 17
Default Timer Minutes countdown?

Ehm, I'm making DM event system, I have to annouce every minute (for 7 mins) that theres an event going it and (mins left)
like
format(blablabla,sizeof(blablabla),"Theres an event going on, %d minutes to join",minutes);
In timer which says the same message for 7 mintues and then, stops the timer
and give player weapons n others
Anyway?
I need just tutorial for how to make this countdown (minutes) without crashing the gamemode.
karemmahmed22 is offline   Reply With Quote
Old 15/09/2015, 07:25 PM   #2
karemmahmed22
Big Clucker
 
karemmahmed22's Avatar
 
Join Date: Jun 2015
Location: Mars
Posts: 183
Reputation: 17
Default Re: Timer Minutes countdown?

Bump
karemmahmed22 is offline   Reply With Quote
Old 15/09/2015, 09:39 PM   #3
[KHK]Khalid
Gangsta
 
[KHK]Khalid's Avatar
 
Join Date: Jan 2012
Location: Alexandria, Egypt
Posts: 854
Reputation: 136
Default Re: Timer Minutes countdown?

Search!
[KHK]Khalid is offline   Reply With Quote
Old 16/09/2015, 05:26 AM   #4
karemmahmed22
Big Clucker
 
karemmahmed22's Avatar
 
Join Date: Jun 2015
Location: Mars
Posts: 183
Reputation: 17
Default Re: Timer Minutes countdown?

Why don't you post an tutorial? I already done that, My server crashes everytime i kill the timer.
karemmahmed22 is offline   Reply With Quote
Old 16/09/2015, 07:14 AM   #5
amirm3hdi
Banned
 
Join Date: Apr 2015
Location: Brain
Posts: 270
Reputation: 14
Default Re: Timer Minutes countdown?

CrashDetect Plugin: http://forum.sa-mp.com/showthread.php?t=262796
amirm3hdi is offline   Reply With Quote
Old 16/09/2015, 01:34 PM   #6
[KHK]Khalid
Gangsta
 
[KHK]Khalid's Avatar
 
Join Date: Jan 2012
Location: Alexandria, Egypt
Posts: 854
Reputation: 136
Default Re: Timer Minutes countdown?

Quote:
Originally Posted by karemmahmed22 View Post
Why don't you post an tutorial? I already done that, My server crashes everytime i kill the timer.
Well then post the code you tried that made your server crash.
[KHK]Khalid is offline   Reply With Quote
Old 16/09/2015, 01:39 PM   #7
Kaliber
High-roller
 
Kaliber's Avatar
 
Join Date: Jun 2012
Location: Localhost
Posts: 1,092
Reputation: 156
Default AW: Timer Minutes countdown?

Just like this:

PHP Code:
//You can say..u make 10 diffrent Events:
#define MAX_EVENTS 10

new mode//@top of the script

//OnGameModeInit
SetTimer(!"@event",1000*60*7,1);
/*
    For explanation:
    1000ms = 1sec
    60sec = 1min
    7 = 7min
*/

//Then the timer:
@event();@event() {
    for(new 
i=GetPlayerPoolSize()+1; --i!=-1;) {
        if(!
IsPlayerConnected(i) || IsPlayerNPC(i)) continue;
        switch(
mode) {
            case 
0: {
                
//Here is the First event
                
GivePlayerWeapon(i,24,500); //Give all players a weapon
                
SetPlayerPos(i,x,y,z); //to set him at a special position
            
}
            case 
1: {
                
//After 14min here is the second event...u can make diffrent things
            
}
            
//And so on..
        
}
    }
    if(++
mode == MAX_EVENTSmode=0//To restart the event List..if it was at MAX_EVENTS
    
return 1;

__________________
Kaliber is offline   Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Timer Countdown [ huge timer's ] RicaNiel Scripting Help 4 28/08/2012 12:43 PM
Countdown of the gametime. Minutes and seconds Biesmen Help Archive 4 13/04/2011 10:34 AM
CountDown in minutes? BlackWolf120 Help Archive 18 11/02/2011 02:10 PM
Countdown from 5 minutes Baboon Help Archive 2 26/11/2010 05:33 PM
[Help] How to Countdown from 10 minutes? I'm gona make a counted down Textdraw.. RyDeR` Help Archive 2 23/07/2009 11:35 AM


All times are GMT. The time now is 07:46 PM.


Powered by vBulletin® Version 3.8.6
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.