SA-MP Forums Archive
announce when 5 hours complete - 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: announce when 5 hours complete (/showthread.php?tid=258741)



announce when 5 hours complete - MA_proking - 01.06.2011

how announce when somebody completes 5 hours


Re: announce when 5 hours complete - DeathOnaStick - 01.06.2011

Set a Timer using SetTimerEx (look in wiki for help), with an interval of (5*1000*60*60)milliseconds (=5hours). The announcement should be placed in the callback that is called when the timer 'waited' 5 hours.
Like I said, in the wiki you will find much help to it and it isnt that complicated.

Cheers.


Re: announce when 5 hours complete - MA_proking - 01.06.2011

Can you tell me full command


Re: announce when 5 hours complete - Biesmen - 01.06.2011

What? Just do what he said, convert his words into code language.
pawn Код:
forward FiveHours(playerid);

public OnPlayerSpawn(playerid)
{
    SetTimerEx("FiveHours", 18000000, true, "i", playerid);
    return 1;
}

public FiveHours(playerid)
{
    return SendClientMessage(playerid, -1, "You've been playing for 5 hours in a row!");
}



Re: announce when 5 hours complete - MA_proking - 01.06.2011

where I put it


Re: announce when 5 hours complete - Biesmen - 01.06.2011

Please learn this before you are going to continue scripting.
https://sampwiki.blast.hk/wiki/Scripting_Basics

After you learned it, we can talk.