Quote:
Originally Posted by еddy
You'll need a timer, and the TogglePlayerControllable.
wiki.sa-mp.com/wiki/SetTimer
wiki.sa-mp.com/wiki/SetTimerEx
wiki.sa-mp.com/wiki/KillTimer
wiki.sa-mp.com/TogglePlayerControllable
Dude, you are lucky because I had nothing to do, and then I did it for you. Here you go:
pawn Код:
#include <a_samp>
public OnPlayerCommandText(playerid, cmdtext[]) { if (strcmp("/teleport", cmdtext, true, 0) == 0) { SetPlayerPos(playerid, Float:X, Float:Y, Float:Z); TogglePlayerControllable(playerid, false); SetTimer("Timer",2000,0); return 1; } return 0; }
forward Timer(playerid); public Timer(playerid) { TogglePlayerControllable(playerid, true); return 0; }
But take a look at it, don't just copy and paste it... Otherwise you won't learn anything!
|
Thanks Eddy, but I already did it by reading on the webside you sent me, thank you anyway