Timed Teleport
#1

Hello, last few days i am making DM GM for my server. I am making good progress. But i have a problem. I am putting custom DM maps on my server. And player should go to map with command. And here is my problem: I want that when a player enters the command to TP had to wait for 3 sec and then to teleport. But i dont know how to do it, i made TP command. But i dont know how to set timer only for 1 cmd.
Reply
#2

pawn Код:
public OnPlayerCommandText(playerid, cmdtext[])
{
if (strcmp("/dm", cmdtext, true, 10) == 0)
{
SendClientMessage(playerid,COLOR_RED1,"Need Wait 3 seconda fo enter in dm.");
SetTimerEx("GoInDM",3000,0,"i",playerid);
}
return 1;
}

forward GoInDM(playerid);
public GoInDM(playerid)
{
SetPlayerPos(playerid, //your pos );
return 1;
}
Reply
#3

Thx, so i need to do new timer for every teleport? Cant i do just a timer without PlayerPos. When time expire it go back to the cmd and tp you.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)