SA-MP Forums Archive
night and weather - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+---- Forum: Help Archive (https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: night and weather (/showthread.php?tid=129628)



night and weather - bartje01 - 22.02.2010

Hey guys. I need that everyone has this:

The time on 00:00
Weather 16

But I wanna keep this forever. So this won't change. My server is going to be named: NightLife RPG :P


Re: night and weather - bajskorv123 - 22.02.2010

Untested, should still work
pawn Код:
//GameModeInit
SetTimer("NightWeather", 5000, true);//Repeating NightWeather evry 5 seconds

//Somewhere in your script
forward NightWeather();
public NightWeather()
{
  for(new i = 0; i < MAX_PLAYERS; i++)//i is now the id of all players
  {
    SetPlayerTime(i, 0);//Sets all players time to 0
    SetPlayerWeather(i, 16);//Sets all players weather to 16
  }
  return 1;
}



Re: night and weather - bartje01 - 22.02.2010


C:\Users\Bart\Desktop\samp server\gamemodes\bartmarc.pwn(2691) : warning 202: number of arguments does not match definition
Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase



Re: night and weather - addinol - 22.02.2010

setplayertime:

(playerid, hour, minute)

playerid The ID of the player
hour Hour to set (0-23)
minute Minutes to set (0-59)

setplayertime(i, 0, 0);


Re: night and weather - bartje01 - 22.02.2010

Yea. Just noticed it a second ago :P
Thanks man


Re: night and weather - bajskorv123 - 22.02.2010

Ah, Sorry forgot about the minute param.
pawn Код:
SetPlayerTime(i, 0, 0);