Hour. - 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: Hour. (
/showthread.php?tid=188340)
Hour. -
Gh0sT_ - 07.11.2010
Why this doesnt work? Tryied to do that: If player find the pickup only at hours 17-20 - he get 1k.. And..
if(pickupid == HidP)
{
new
Hour, Minutes, Second
;
if( Hour > 16 && Hour < 21 )
{
GivePlayerMoney( playerid , 1000 );
}
else
{
SendClientMessage( playerid , COLOR , "Only for 17, 18, 19, 20, 21h!" );
}
return 1;
}
But, when i come to it ~19:30 its say, that this only for 17, 18, 19, 20, 21 h.
Re: Hour. -
LarzI - 07.11.2010
You don't need to define Second, and use GetPlayerTime
Re: Hour. -
Gh0sT_ - 07.11.2010
Ok, this will be:
f(pickupid == HidP)
{
new
Hour, Minutes
;
GetPlayerTime(Hour, Minutes);
if(Hour > 16 && Hour < 22 && Minutes > 0 && Minutes < 60)
{
GivePlayerMoney( playerid , 1000 );
}
else
{
SendClientMessage( playerid , COLOR , "Only for 17, 18, 19, 20, 21h!" );
}
return 1;
}
Re: Hour. -
Bessensap - 07.11.2010
use [pawn] [ /pawn] please