#1

hey thats what i got
PHP код:
#include <a_samp>
#pragma tabsize 0
#include "zcmd"
#include "sscanf2"
new hourminute;
CMD:settime(playerid,params[])
{
    new 
playername[32],dformat[100];
    if (!
IsPlayerAdmin(playerid)) return SendClientMessage(playerid,0xFF0000FF,"You have to be admin");
    if(
sscanf(params,"dd",hour,minute)) return SendClientMessage(playerid,0xFF0000FF,"USAGE: /settime [hour] [minute]");
    for(new 
0MAX_PLAYERSi++)
    {
    
SetPlayerTime(i,hour,minute);
    
GetPlayerName(playerid,playername,sizeof(playername));
    }
    
format(dformat,sizeof(dformat),"{ffff02}%s {00ff00}changed server time",playername);
    
SendClientMessageToAll(0xFFFFFFFF,dformat);
    return 
1;
}
public 
OnFilterScriptInit()
{
    
txtTimeDisp TextDrawCreate(605.0,25.0,"00:00");
    
TextDrawUseBox(txtTimeDisp0);
    
TextDrawFont(txtTimeDisp3);
    
TextDrawSetShadow(txtTimeDisp,0); // no shadow
    
TextDrawSetOutline(txtTimeDisp,2); // thickness 1
    
TextDrawBackgroundColor(txtTimeDisp,0x000000FF);
    
TextDrawColor(txtTimeDisp,0x00FF00FF);
    
TextDrawAlignment(txtTimeDisp,3);
    
TextDrawLetterSize(txtTimeDisp,0.5,1.5);
    
SetTimer("UpdateHour",1000,true);

Can anyone make that the hour would update...every minute will past in second in real life...PLEASE HELP!
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)