Help Make Get Time Weekend
#1

How to Make a System when the Day Weekend ..
The Player Get Double Score ?

Maybe I Must Make GetDay Saturday and Sunday But How to Make This ?
I Want Get Day at GMT+7

Anyone ?
Reply
#2

Add this atop of your script ....
Код:
#define DOUBLE_EXP_ENABLED
Now search on your script when you kill someone how much score u get
Код:
#if defined DOUBLE_EXP_ENABLED
					{
				    	PlayerInfo[playerid][pScore] += whatever the score x2;
					}
If you don't mind please rep+ me for my tribute.
Reply
#3

Quote:
Originally Posted by DevinPatino
Посмотреть сообщение
Add this atop of your script ....
Код:
#define DOUBLE_EXP_ENABLED
Now search on your script when you kill someone how much score u get
Код:
#if defined DOUBLE_EXP_ENABLED
					{
				    	PlayerInfo[playerid][pScore] += whatever the score x2;
					}
If you don't mind please rep+ me for my tribute.
I Mean When The Date is Saturday Or Sunday ..The Players Get Score x2
Your Help is About Make That Manual,Not Make That Auto Change The Score !

I Mean How to GetTime at Saturday And Sunday?
Reply
#4

Quote:
Originally Posted by Amunra
Посмотреть сообщение
I Mean When The Date is Saturday Or Sunday ..The Players Get Score x2
Your Help is About Make That Manual,Not Make That Auto Change The Score !

I Mean How to GetTime at Saturday And Sunday?
This will take ages to make that do that for now during the day of Saturday and Sunday there is pently of time for a quick restart (which sets it to double xp).
Reply
#5

Quote:
Originally Posted by DevinPatino
Посмотреть сообщение
This will take ages to make that do that for now during the day of Saturday and Sunday there is pently of time for a quick restart (which sets it to double xp).
So If I Want Make That , I Must Restart Server ?
Maybe Other Server Make That Auto Changes
Reply
#6

Quote:
Originally Posted by DevinPatino
Посмотреть сообщение
This will take ages to make that do that for now during the day of Saturday and Sunday there is pently of time for a quick restart (which sets it to double xp).
What the hell are you talking about? Cut the bullshit already cause you're just posting to raise your posts count. If you got nothing useful to say, don't post at all.

OP, a simple search would come up with alot of results http://forum.sa-mp.com/search.php?searchid=10487745
Reply
#7

Quote:
Originally Posted by -CaRRoT
Посмотреть сообщение
What the hell are you talking about? Cut the bullshit already cause you're just posting to raise your posts count. If you got nothing useful to say, don't post at all.

OP, a simple search would come up with alot of results http://forum.sa-mp.com/search.php?searchid=10487745
Let's Talk About TimeStamp.inc
So How To Use That ?
I Need More Example
Reply
#8

example code (to be modified)
set the current day, and when the server is active to check if the date changed

PHP код:
SetTimerEx("ControlQuota",60*1000,0,"d",1); //1 minute or you can give more, depends on how accurate you want to be
sTemp[quotaday] - day number
sTemp
[quotadate] - date number (Save in SQL)
forward ControlQuota(tec);
public 
ControlQuota(tec){
    
#pragma unused tec
    
    
new tmpdatetmpyeartmpmonthtmpday;
    
getdate(tmpyear,tmpmonth,tmpday);
    
    
tmpdate = (10000*tmpyear)+(100*tmpmonth)+tmpday;
    
    if(
tmpdate != sTemp[quotadate]){ //new day
        
sTemp[quotaday] += 1;
        
sTemp[quotadate] = tmpdate;
        
SaveQuota(); //save sTemp[quotadate] in SQL or INI
    
}
    if(
sTemp[quotaday] == 5){ //Saturday
        
if(!myFunct){
            
myFunct true;
            
            
        }
    } else if(
sTemp[quotaday] == 6){ //Sunday
        
if(!myFunct){
            
myFunct true;
            
            
        }
    } else if(
sTemp[quotaday] == 7){ //restart
        
sTemp[quotaday] = 0;
        
SaveQuota(); //save sTemp[quotadate] in SQL or INI
    
}
    return 
1;
}
/*
1 Tuesday
2 Wednesday
3 Thursday
4 Friday
5 Saturday
6 Sunday
7 => 0 Monday (restart => at restart)
*/
CMD:setquotaday(playerid,params[]){
    if(
isnull(params)) return SendClientMessage(playerid,-1,"››› Usage: /setquotaday <day>");
    new 
qday;
    
sscanf(params,"d",qday);
    if(
qday || qday 7) return SendClientMessage(playerid,-1,"››› Range 0 - 7");
    
sTemp[quotaday] = qday;
    
SaveQuota(); //save sTemp[quotadate] in SQL or INI
    
return 1;

Reply
#9

Wait u mean something like payday?
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)