Timer help!
#1

Can someone tell me how to make a timer "like type /help to see the commands".I look in https://sampwiki.blast.hk/wiki/SetTimer and did it but the timer isnt working.Can some tell how.
Reply
#2

What do you actually want to create?
Like a textdraw or just send client message?
Reply
#3

I want when i connect in my server all player to in the chat Type /Help To See The Commands and then i want it to repeat in 1 minute.
Reply
#4

http://forum.sa-mp.com/showthread.ph...ight=pmessages
Reply
#5

OnPlayerConnect:
pawn Код:
SetTimer("help",60000,false);
anywhere:
pawn Код:
forward help;

public help {
//Feel free to edit the message :D
     SendClientMessageToAll(your color here,"/help to see commands");
     SetTimer("help",60000,false);
}
Reply
#6

Quote:
Originally Posted by Seven_of_Nine
Посмотреть сообщение
OnPlayerConnect:
pawn Код:
SetTimer("help",60000,false);
anywhere:
pawn Код:
forward help;

public help {
//Feel free to edit the message :D
     SendClientMessageToAll(your color here,"/help to see commands");
     SetTimer("help",60000,false);
}
After a couple players connect, that snippet would spam them all alot.
Reply
#7

@Seven_of_Nine - Why not set the timer to repeate...? Instead of making it run over and over, you can make it much easier.

+

What Cameltoe said in post above. That would be problem...
Reply
#8

OK what to do then?Pooh 7 i want my on timer not this FS.
Reply
#9

Quote:
Originally Posted by Pooh7
Посмотреть сообщение
Not what he wanted at all.

Quote:
Originally Posted by xRyder
Посмотреть сообщение
@Seven_of_Nine - Why not set the timer to repeate...? Instead of making it run over and
pawn Код:
new
    HelpTimer[MAX_PLAYERS];
   
command(help, playerid, params[])
{
    if(HelpTimer[playerid]) { KillTimer(HelpTimer[playerid]); HelpTimer[playerid] = 0; }
    else SetTimerEx("HelpFunction", 60 * 1000, true, "i", playerid);
    return 1;
}

forward HelpFunction(playerid);
public HelpFunction(playerid)
{
    SendClientMessage(playerid, 0x0, "Help message # 1.");
    return 1;
}
Should work, and wont spam the players.

Remember to kill the timer OnPlayerDisconnect.
Reply
#10

Ok but where to put all these stuff
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)