Random Message fast message
#1

I have problem about random message.
Messages work normal with normal speed,but when player death random messages changing to fast.
my randommessage timer is under onplayerspawn

ChangeMessage = SetTimer("ChangeMessage", 100, true);

i think i need set under onplayerdeath killtimer for ChangeMessage and start timer again..

Who help me i give R+
Reply
#2

100 = one hunder millisecond = 1 over 10 second !!
Reply
#3

Quote:
Originally Posted by nezo2001
Посмотреть сообщение
100 = one hunder millisecond = 1 over 10 second !!
Never mind i increase now the timer,but again messages going to fast if player are death..

SetTimer("RandomMessage",8000,1);
Reply
#4

You should create a separate callback for random message rather than putting it under onplayerdeath or spawn and put the timer under OnGameModeinit.
Reply
#5

Can you give me the example?
Reply
#6

pawn Код:
//Under OnGameModeInit
SetTimer("RandomMessage",60000,1); //1 minute period

forward RandomMessage();
public RandomMessage() {
    new mrand =random(2); //no of messages
    if(mrand == 1) {
       SendMessageToAll(COLOR_YELLOW,"Random message 1");}
    if(mrand == 2) {
        SendMessageToAll(COLOR_YELLOW,"Random message 2");}
    return 1;}
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)