freeze
#1

Hi i want to freeze a player when thet do a teleport but not sure how to do it for certian time then unfreeze them here is a teleport cmd to ref to.

Код:
case 0:
				{
					GameTextForPlayer(playerid,"~b~Transfender",3000,1);
					SetVehiclePos(GetPlayerVehicleID(playerid),1041.7133,-1037.8425,31.4627); // Teleports the vehicle
					SetPlayerPos(playerid,1041.7133,-1037.8425,31.4627); // teleports the player
				}
Many thanks
Reply
#2

pawn Код:
stock Freeze(playerid, time)
{
    TogglePlayerControllable(playerid, false);
    SetTimerEx("Unfreeze", time, false, "i", playerid)
}
forward Unfreeze(playerid);
public Unfreeze(playerid)
    TogglePlayerControllable(playerid, true);


//now you can use
case 0:
{
    GameTextForPlayer(playerid,"~b~Transfender",3000,1);
    SetVehiclePos(GetPlayerVehicleID(playerid),1041.7133,-1037.8425,31.4627); // Teleports the vehicle
    SetPlayerPos(playerid,1041.7133,-1037.8425,31.4627); // teleports the player
    Freeze(playerid, 10000);//for 10 seconds
}
Reply
#3

Thanks man.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)