Can somone help me
#4

Код:
SetTimerEx("<TimerName>", <time (1s is 1000)>, <boolean(can be called multiple times)>, "i", playerid<playerthatgetsthis>);
Then, out of that command or whatever, forwarding the <TimerName>and using it as a callback makes you able to put codes in there, so once you entered that ^^ up there, do the following.

Код:
forward <TimerName>(playerid);
public <TimerName>(playerid);
{
    // insert code here that you want to put, this code appears after the timer has passed, so
    SendClientMessage(playerid, -1, "The timer has passed and you may report once more!.");
return 1;
}

Hope this helps you with it, I don't understand timers so well either, so apologies if there are mistakes!

Actually I didn't read yours very well, so here's one I use for my own reports -----------

Add this to the top first:
Код:
new PlayerHasReported[MAX_PLAYERS]; // this is just a thing that indicates if the player has reported
Код:
if(PlayerHasReported[playerid] == 1) // this gets if the player has /report'ed in the last 10 seconds
        {
            SendClientMessage(playerid, COLOR_GREY, "   Wait 10 seconds after sending a next report ! "); // self explainatory
            return 1;
        }
// code here
SetTimerEx("ReportReset", 10000, false, "i", playerid); // timer that stops you from reporting again in 10 seconds
PlayerHasReported[playerid] = 1; // this is to say that they have reported in the last 10 seconds
Once you made that, we can go to forwarding
Код:
forward ReportReset(playerid);
public ReportReset(playerid)
{
	if(IsPlayerConnected(playerid)) // checks if player is connected
	{
	    if(PlayerHasReported[playerid] == 1) PlayerHasReported[playerid] = 0; // if player's 10 seconds cooldown is over then it allows them to report again
	}
}
I hope this will do the trick

Sorry if I made any mistakes, I just woke up.
Reply


Messages In This Thread
Can somone help me - by JakeHunter1 - 23.01.2015, 08:59
AW: Can somone help me - by Saize - 23.01.2015, 09:04
Re: AW: Can somone help me - by JakeHunter1 - 23.01.2015, 09:08
Re: Can somone help me - by JaydenJason - 23.01.2015, 09:23
Re: AW: Can somone help me - by JakeHunter1 - 23.01.2015, 09:23
Re: AW: Can somone help me - by JaydenJason - 23.01.2015, 09:58
Re: AW: Can somone help me - by JakeHunter1 - 23.01.2015, 10:03

Forum Jump:


Users browsing this thread: 1 Guest(s)