#1

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);
    }
//==============================================================================
Reply
#2

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
Reply
#3

Nice Ikarus
Reply
#4

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.
Reply
#5

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.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)