Posts: 1,059
Threads: 86
Joined: Sep 2010
Reputation:
0
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?
Posts: 1,047
Threads: 23
Joined: Jun 2009
Posts: 1,047
Threads: 23
Joined: Jun 2009
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.
Posts: 1,047
Threads: 23
Joined: Jun 2009
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
}
Posts: 1,047
Threads: 23
Joined: Jun 2009
Maybe it's the client that after load it goes to another 'default' location? Or your code is maybe wrong.