Help[what's wrong?:|]
#1

There is a /fish command and between it's scripts i putted this thing to prevent spamming the fishes


pawn Код:
PlayerInfo[playerid][pJustFished] = 1;
                        SetTimer("FishingTime",6000,false);


forward FishingTime(playerid)
public FishingTime(playerid)
{
    PlayerInfo[playerid][pJustFished] = 0;
    return 1;
}
It worked yesterday,but now it is not changing the PlayerInfo[playerid][pJustFished] to 0 .
There is a problem with the timer but i don't know wich is it
Reply
#2

When using the playerid parameter, you must do SetTimerEx. What you just did, is setting the repeat to false, which will stop!SetTimerEx is used when using it on a specified player, but SetTimer is used when you use it global, not for a specified player.

Do this instead.
pawn Код:
SetTimerEx( "FishingTime", 6000, true, "i", playerid );
There you go.
Reply
#3

Thanks alot man,it worked,i never knew the difference between simple and Ex,thanks alot!
Reply
#4

He doesn't want a repeating timer:
pawn Код:
SetTimerEx("FishingTime", 6000, false, "i", playerid);
Reply
#5

Quote:
Originally Posted by Jeffry
Посмотреть сообщение
He doesn't want a repeating timer:
pawn Код:
SetTimerEx("FishingTime", 6000, false, "i", playerid);
True, but he just learned that too, didn't he ?

Thanks Jeffry for correcting me, I've been here for like 4 hours, browsing this section and helping people out..

My post count jumped from 2.780 or so to 2.825 >.<
I apology if i did spam...
Reply
#6

Quote:
Originally Posted by Zh3r0
Посмотреть сообщение
True, but he just learned that too, didn't he ?

Thanks Jeffry for correcting me, I've been here for like 4 hours, browsing this section and helping people out..

My post count jumped from 2.780 or so to 2.825 >.<
I apology if i did spam...
Wow, 4 hours, quite alot. But thats why we can help each other.
And the good point: He knowns now 'true' and 'false'.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)