[Pedido] Horбrio SAMP.
#1

tipo queria um sistema igual o GM do GodFather que quando anoitece na vida real anoitece no samp.

se alguйm puder me passar eu agradeзo, valew ai!
Reply
#2

SetWorldTime
Reply
#3

mano me manda o comando pronto eu sou muito noob!

POR FAVOR!
Reply
#4

farei um simples

pawn Код:
//topo
forward tempo();

//OnGameModeInit()
SetTimer("tempo", 1000, 1);

//Fim do script
public tempo()
{
    new h,m,s;
    gettime(h, m, s);
    SetWorldTime(h);
    return 1;
}
Reply
#5

Quote:
Originally Posted by Spencer1
Посмотреть сообщение
mano me manda o comando pronto eu sou muito noob!

POR FAVOR!
E se continuar nessa de pedir comando pronto, vai ser pra sempre...
Mude suas atitudes que o seu conhecimento tambйm vai mudar !
Reply
#6

quando tu baixa o "SA-MP Server" vem nos FilterScripts gl_realtime, sу vc colocar ele '-'
Reply
#7

cara olha esse aqui e muito legalzin e garanto que pega ! ta en forma de Filter Scripter !
so adiconar nos Filter Scripter e nota no srever . CFG
ta ai :

Real Timer

pawn Код:
//
// Keeps the in game time synced to the server's time and
// draws the current time on the player's hud using a textdraw/
// (1 minute = 1 minute real world time)
//
//  Kye 2009

#include <a_samp>
#pragma tabsize 0

//--------------------------------------------------

new Text:txtTimeDisp;
new hour, minute;
new timestr[32];

forward UpdateTime();

//--------------------------------------------------


public UpdateTime()
{
    gettime(hour, minute);
    format(timestr,32,"%02d:%02d",hour,minute);
    TextDrawSetString(txtTimeDisp,timestr);
   
    SetWorldTime(hour);
   
    new x=0;
    while(x!=MAX_PLAYERS) {
        if(IsPlayerConnected(x) && GetPlayerState(x) != PLAYER_STATE_NONE) {
            SetPlayerTime(x,hour,minute);
         }
         x++;
    }
}

//--------------------------------------------------

public OnGameModeInit()
{
    // Init our text display
    txtTimeDisp = TextDrawCreate(605.0,25.0,"00:00");
    TextDrawUseBox(txtTimeDisp, 0);
    TextDrawFont(txtTimeDisp, 3);
    TextDrawSetShadow(txtTimeDisp,0); // no shadow
    TextDrawSetOutline(txtTimeDisp,2); // thickness 1
    TextDrawBackgroundColor(txtTimeDisp,0x000000FF);
    TextDrawColor(txtTimeDisp,0xFFFFFFFF);
    TextDrawAlignment(txtTimeDisp,3);
    TextDrawLetterSize(txtTimeDisp,0.5,1.5);
   
    UpdateTime();
    SetTimer("UpdateTime",1000 * 60,1);

    return 1;
}

//--------------------------------------------------

public OnPlayerSpawn(playerid)
{
    TextDrawShowForPlayer(playerid,txtTimeDisp);
   
    gettime(hour, minute);
    SetPlayerTime(playerid,hour,minute);
   
    return 1;
}

//--------------------------------------------------

public OnPlayerDeath(playerid, killerid, reason)
{
    TextDrawHideForPlayer(playerid,txtTimeDisp);
    return 1;
}

//--------------------------------------------------

public OnPlayerConnect(playerid)
{
    gettime(hour, minute);
    SetPlayerTime(playerid,hour,minute);
    return 1;
}

//--------------------------------------------------
Ajudei ? +rep
nao ajudei ! mais tentei
Reply
#8

pawn Код:
new x=0;    
while(x!=MAX_PLAYERS)
sу por curiosidade para entender, уque esse while estб fasendo, tou estudando loops sу para melhor entendimento =]
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)