[Solved][HELP] TogglePlayerClock -
Roiasher - 08.04.2011
in my gamemode the clock exists and it makes the time change and too quick, the light is over and its night.
its VERY annoying because its a DM gamemode.
i wanted to cancel the clock, and i found the funcion : TooglePlayerClock(playerid,toogle) - toogle = 1 or 0
and made it like this:
public OnGameModeInit bla bla
bla bla
TooglePlayerClock(playerid,0)
BLA BLA BLA ETC.
and it made me an error: undefined symbol "playerid"
so i puted it in public OnPlayerConnect, and it didn't work.
(SORRY FOR POOR ENGLISH!)
can you help me?
Re: [HELP] TooglePlayerClock -
THE_KNOWN - 08.04.2011
i had that problem befor... make a timer with 1 sec interval and two varss (for server hour and minutes). then min+1 for everyone when the timer event strikes. so the clocks synced
Re: [HELP] TooglePlayerClock -
Roiasher - 08.04.2011
I don't really know how to do that, i think i'm asleep

can you send me the code?
Re: [HELP] TooglePlayerClock -
THE_KNOWN - 08.04.2011
Код:
new chour;
new cminutes;
//ongminit()
SetTimer("Clock",1000,true);
//somewhere
forward Clock();
public clock()
{
cminutes++;
if(cminutes == 60) { cminutes=0; chour++; if(chour == 24) { chour=0; } }
SetWorldTime(chour);
for(new i;i<MAX_PLAYERS;i++)
{
SetPlayerTime(i,chour,cminutes);
}
return 1;
}
Re: [HELP] TooglePlayerClock -
[CrC]reinixx - 08.04.2011
try to use that under onpalyerstreamin..
Re: [HELP] TooglePlayerClock -
THE_KNOWN - 08.04.2011
Quote:
Originally Posted by [CrC]reinixx
try to use that under onpalyerstreamin..
|
it wouldnt sync the players clock...
Re: [HELP] TooglePlayerClock -
Roiasher - 08.04.2011
THE_KNOWN: its the same, clock's moving.
reinixx: i dont have that public, can you write me exactly the name of it (not onPalyer i think

)
i DONT want the clock to move
Re: [HELP] TooglePlayerClock -
THE_KNOWN - 08.04.2011
so yuo dont want the clock? then untoggle the playerclock and set all players time to someting you want
Re: [HELP] TooglePlayerClock -
BMUK - 08.04.2011
You can use TogglePlayerClock(playerid,0);
under OnPlayerConnect
And SetWorldTime(12);
under OnGameModeInit
TogglePlayerClock would only return an undefined playerid if you used it where playerid is not defined, so use it where you're meant to use it and it will be fine.
Quote:
Originally Posted by [CrC]reinixx
try to use that under onpalyerstreamin..
|
stfu.
Re: [HELP] TooglePlayerClock -
Roiasher - 08.04.2011
BMUK: THANK YOU! IT WORKS! YOU ARE A KING MAN!
OT whats stfu?