#1

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

You don't need to define Second, and use GetPlayerTime
Reply
#3

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;
}
Reply
#4

use [pawn] [ /pawn] please
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)