How to make connect message delayed?
#1

Say when a player connects, it shows a textdraw or gametext on the screen, etc...

I want it to be delayed for maybe 5 seconds so the player can take a quick look before it puts the player into class selection.

Do I use SetTimer?
Reply
#2

Yes that can be used.
Reply
#3

Quote:
Originally Posted by gamer_Z
Посмотреть сообщение
Yes that can be used.
not really, IMO, its better to use GameTextForPlayer
Reply
#4

He want's to delay the execution of code so the player screen will be 'frozen' for a while.. at least that is what I think he wants to do.
Reply
#5

Yes, gamer_Z is correct.
Reply
#6

Yep then let's say, make a copy of your current 'public OnPlayerconnect...' and name it something like OnPlayerConnect2 and in OnPlayerConnect make a timer that calls OnPlayerConnect2 BUT do NOT use SETTIMER BUT INSTEAD USE SetTimerEx("OnPlayerConnect2",5000,0,"d",playerid) ;

example:

pawn Код:
public OnPlayerConnect(playerid)
{
     SetTimerEx("OnPlayerConnect2",5000,0,"d",playerid);
     return 1;
}

forward OnPlayerConnect2(playerid);
public OnPlayerConnect2(playerid)
{
     //your original onplayerconnect code
}
Reply
#7

Thanks. But it delays 5 seconds AFTER the player is in class selection, not when they are on the Santa Marina Beach background.

Do you know why?
Reply
#8

Maybe it's the client that after load it goes to another 'default' location? Or your code is maybe wrong.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)