Timer Minutes countdown?
#1

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.
Reply
#2

Bump
Reply
#3

Search!
Reply
#4

Why don't you post an tutorial? I already done that, My server crashes everytime i kill the timer.
Reply
#5

CrashDetect Plugin: https://sampforum.blast.hk/showthread.php?tid=262796
Reply
#6

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.
Reply
#7

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;

Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)