Remove messages when connect and send new?
#1

Hi! I want to remove that messages when i joining my server, And send new messages istead... Like
Welcome to Latvia stunt!..

this code is loading verry slow is it any ways to make a faster one?
Код:
public OnPlayerConnect(playerid)
{
    SetTimerEx("ClearChat", 500, false, "d", playerid);
    return 1;
}

forward TimerWelcome(playerid);
public TimerWelcome(playerid)
{
    SendClientMessage(playerid, -1, "Welcome to latvia stunt server!");
    return 1;
}

forward ClearChat(playerid);
public ClearChat(playerid)
{
	for(new i = 0; i < 50; i++) SendClientMessage(playerid, -1," ");
	SetTimerEx("TimerWelcome", 1000, false, "d", playerid);
	return 1;
}
Reply
#2

Ok theres no need for a timer here, simply make a stock for the clearchat and then send the message.
pawn Код:
public OnPlayerConnect(playerid)
{
    ClearChat(playerid); //clear the chat first
    SendClientMessage(playerid, -1, "Welcome to latvia stunt server!"); //then send the message
    return 1;
}

stock ClearChat(playerid)
{
    for(new i = 0; i < 50; i++) SendClientMessage(playerid, -1," ");
    return 1;
}
Try to use as less timers as possible in your script, good luck !
Reply
#3

Quote:
Originally Posted by Voxel
Посмотреть сообщение
Ok theres no need for a timer here, simply make a stock for the clearchat and then send the message.
pawn Код:
public OnPlayerConnect(playerid)
{
    ClearChat(playerid); //clear the chat first
    SendClientMessage(playerid, -1, "Welcome to latvia stunt server!"); //then send the message
    return 1;
}

stock ClearChat(playerid)
{
    for(new i = 0; i < 50; i++) SendClientMessage(playerid, -1," ");
    return 1;
}
Try to use as less timers as possible in your script, good luck !

Then it be like this..
And how can i have same position on login and class selection??
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)