time - 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: time (
/showthread.php?tid=163601)
time -
willsuckformoney - 28.07.2010
Im having a day where i cant get anything done by myself, someone help please trying to get it so that when its 17:50 it sends a message to all that a huge explosion goes off at 18:25, compiles and works only thing that shows is the on player spawn message
pawn Код:
public OnPlayerSpawn(playerid)
{
SendClientMessage(playerid, red, "Explosion happens at 18:25");
new hour, minutes;
GetPlayerTime(playerid, hour, minutes);
if(hour == 17 && minutes == 10)
{
SendClientMessageToAll(red, "WARNING: EXPLOSION COMING IN 35SECONDS");
}
else if(hour == 18 && minutes == 25)
{
CreateExplosion(2034.5475,1831.8447,11.8979,7,900);
}
//==============================================================================
Re: time -
[MWR]Blood - 28.07.2010
Hmmm, try that way:
pawn Код:
//Under OnGameModeInit:
forward Explosion (playerid);
public Explosion (playerid)
{
SendClientMessage(playerid, red, "Explosion happens at 18:25");
new hour, minutes;
GetPlayerTime(playerid, hour, minutes);
if(hour == 17 && minutes == 10)
{
SendClientMessageToAll(red, "WARNING: EXPLOSION COMING IN 35SECONDS");
}
else if(hour == 18 && minutes == 25)
{
CreateExplosion(2034.5475,1831.8447,11.8979,7,900);
}
return 1;
}
//Under OnPlayerSpawn add only this:
Explosion(playerid);
Hope it works
Re: time -
Fre$hKidd - 28.07.2010
Nice Ikarus
Re: time -
willsuckformoney - 28.07.2010
giving it a try
Код:
C:\Users\Charlie\Desktop\server 2\gamemodes\LVDM1.0.pwn(658) : warning 202: number of arguments does not match definition
C:\Users\Charlie\Desktop\server 2\gamemodes\LVDM1.0.pwn(658) : warning 202: number of arguments does not match definition
Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase
2 Warnings.
Re: time -
iggy1 - 28.07.2010
Just a little curious would you not be better using a timer or onplayerupdate?? you do know that the explosion should only happen if someone spawns at 18:25(player time) if you use OnPlayerSpawn. If no-one spawns at 18:25 nothing will happen.