How to do dis :D?
#6

Quote:
Originally Posted by Stinged
Посмотреть сообщение
pawn Код:
new
    bCount[MAX_PLAYERS],
    bTimer[MAX_PLAYERS];

public OnPlayerDisconnect(playerid, reason)
{
    bCount[playerid] = 0;
    KillTimer(bTimer[playerid]);
    return 1;
}

CMD:send(playerid, params[])
{
    new repeat, message[128];
    if (sscanf(params, "is[128]", repeat, message)) return SendClientMessage(playerid, -1, "Usage: /send [repeat] [message]");
    else if (repeat < 1) return SendClientMessage(playerid, -1, "Usage: /send [repeat] [message]");
    bTimer[playerid] = SetTimerEx("Broadcast_Timer", 10000, true, "is", repeat, message);
    return 1;
}

forward Broadcast_Timer(repeat, message[]);
public Broadcast_Timer(repeat, message[])
{
    bCount[playerid]++;
    SendClientMessageToAll(-1, message);
    if (bCount[playerid] == repeat)
    {
        KillTimer(bTimer[playerid]);
    }
}
It doesn't work.. It just says like random parts of the message everything else works except the message..
Reply


Messages In This Thread
How to do dis :D? - by Nojus741 - 05.09.2014, 12:19
Re: How to do dis :D? - by jueix - 05.09.2014, 12:20
Re: How to do dis :D? - by Nojus741 - 05.09.2014, 12:22
Re: How to do dis :D? - by Stinged - 05.09.2014, 12:27
Re: How to do dis :D? - by Nojus741 - 05.09.2014, 12:30
Re: How to do dis :D? - by Nojus741 - 05.09.2014, 13:16

Forum Jump:


Users browsing this thread: 1 Guest(s)