Little bit confused
#1

Okay, I'm still a little bit confused about timers
So, how can I make the player, when he teleports
to a certain place, TogglePlayerControllable(playerid, 0);
for 3 seconds, then TogglePlayerControllable(playerid, 1);
if 3 seconds has pass-by. The reason why I want the player
to freeze first before he can land on the ground, is because,
so the objects will load first
Reply
#2

Quote:
Originally Posted by ViruZZzZ_ChiLLL
Okay, I'm still a little bit confused about timers
So, how can I make the player, when he teleports
to a certain place, TogglePlayerControllable(playerid, 0);
for 3 seconds, then TogglePlayerControllable(playerid, 1);
if 3 seconds has pass-by. The reason why I want the player
to freeze first before he can land on the ground, is because,
so the objects will load first
pawn Код:
public OnPlayerCommandText(playerid, cmdtext[])
{
if(strcmp(cmdtext, "/teleport", true) == 0)
{
SetTimerEx("UnFreeze", 3000, 0, "i", playerid);
}
return 1;
}


forward UnFreeze(playerid);
public UnFreeze(playerid)
{
   TogglePlayerControllable(playerid, 1);
   SendClientMessage(playerid,COLOR,"Objects Loaded");
}
Reply
#3

Quote:
Originally Posted by Anthony_Brassi
Quote:
Originally Posted by ViruZZzZ_ChiLLL
Okay, I'm still a little bit confused about timers
So, how can I make the player, when he teleports
to a certain place, TogglePlayerControllable(playerid, 0);
for 3 seconds, then TogglePlayerControllable(playerid, 1);
if 3 seconds has pass-by. The reason why I want the player
to freeze first before he can land on the ground, is because,
so the objects will load first
pawn Код:
public OnPlayerCommandText(playerid, cmdtext[])
{
if(strcmp(cmdtext, "/teleport", true) == 0)
{
SetTimerEx("UnFreeze", 3000, 0, "i", playerid);
}
return 1;
}


forward UnFreeze(playerid);
public UnFreeze(playerid)
{
   TogglePlayerControllable(playerid, 1);
}
Okay, cool thanks I nevar get this timers -.-'
Reply
#4

Quote:
Originally Posted by ViruZZzZ_ChiLLL
Quote:
Originally Posted by Anthony_Brassi
Quote:
Originally Posted by ViruZZzZ_ChiLLL
Okay, I'm still a little bit confused about timers
So, how can I make the player, when he teleports
to a certain place, TogglePlayerControllable(playerid, 0);
for 3 seconds, then TogglePlayerControllable(playerid, 1);
if 3 seconds has pass-by. The reason why I want the player
to freeze first before he can land on the ground, is because,
so the objects will load first
pawn Код:
public OnPlayerCommandText(playerid, cmdtext[])
{
if(strcmp(cmdtext, "/teleport", true) == 0)
{
SetTimerEx("UnFreeze", 3000, 0, "i", playerid);
}
return 1;
}


forward UnFreeze(playerid);
public UnFreeze(playerid)
{
   TogglePlayerControllable(playerid, 1);
}
Okay, cool thanks I nevar get this timers -.-'
np, have fun
Reply
#5

Код:
public OnPlayerCommandText(playerid, cmdtext[])
{
if(strcmp(cmdtext, "/teleport", true) == 0)
{
SetTimerEx("UnFreeze", 3000, 0, "i", playerid);
SetPlayerPos(playerid, x, y, z);
TogglePlayerControllable(playerid, 0);
}
return 1;
}
forward UnFreeze(playerid);
public UnFreeze(playerid)
{
TogglePlayerControllable(playerid, 1);
}
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)