welcome msg not hide for second player - Printable Version
+- SA-MP Forums Archive (
https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (
https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (
https://sampforum.blast.hk/forumdisplay.php?fid=12)
+---- Forum: Help Archive (
https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: welcome msg not hide for second player (
/showthread.php?tid=87376)
welcome msg not hide for second player -
[SOB]Chris - 19.07.2009
i have a problem i make a msg for the welcome, and it works but only whith the first person enter in the server, the second person show the msg but pas 8 seconds not hide i dont know why? here are the code.
Top of the script
Code:
new Text:msgbienve;
forward message(playerid);
public OnPlayerConnect(playerid)
Code:
{
SendClientMessage(playerid,COLOR_WHITE,"Bienvenido al Servidor, para ver los comando escriba /cmds.");
TextDrawShowForPlayer(playerid,msgbienve);
SetTimer("message",8000,false);
return 1;
}
public OnGameModeInit()
Code:
{
msgbienve=TextDrawCreate(315,220,"Bienvenido~n~ ~<~ Styles of Beyond Server ~>~");
TextDrawLetterSize(msgbienve,0.8,2.0);
TextDrawAlignment(Text:msgbienve,2);
TextDrawSetShadow(Text:msgbienve,1);
TextDrawSetOutline(Text:msgbienve,1);
TextDrawFont(Text:msgbienve,3);
TextDrawColor(Text:msgbienve,0x000000ff);
TextDrawBackgroundColor(Text:msgbienve,0xffffffff);
}
public message(playerid)
Code:
{
TextDrawHideForPlayer(playerid,Text:msgbienve);//Here the hide, but???
}
the second player in enter to the server not hide the message, why?
Re: welcome msg not hide for second player -
Weirdosport - 19.07.2009
The playerid doesn't magically get there on it's own accord. Replace your SetTimer line with this:
SetTimerEx("message", 8000, 0, "i", playerid);