Help with freezin - Printable Version
+- SA-MP Forums Archive (
https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (
https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (
https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: Help with freezin (
/showthread.php?tid=593357)
Help with freezin -
CraTzy - 04.11.2015
Sup guys i got a small problem just finished my EDM/DM gamemode but when players spawn they fell of the map
Its like MTA DM racing u know what i mean
how can i make them freeze for 20 sec on spawn ? and make them not fall down
Re: Help with freezin -
IceBilizard - 04.11.2015
pawn Код:
new SpawnTimer[MAX_PLAYERS]; //At top of script
public OnPlayerSpawn(playerid)
{
TogglePlayerControllable(playerid,0);
SpawnTimer[playerid] = SetTimerEx("unfreezetimer", 20000, 0, "i", playerid);//Timer to unfreeze player
}
forward unfreezetimer(playerid);
public unfreezetimer(playerid)
{
TogglePlayerControllable(playerid,1);
}
public OnPlayerDisconnect(playerid, reason)
{
KillTimer(SpawnTimer[playerid]);
return 1;
}
Re: Help with freezin -
CraTzy - 05.11.2015
not work , players spawn in vehicle and the position moves :/ i need to freez them in Sky or dedicated pos
Re: Help with freezin -
Karan007 - 05.11.2015
PHP код:
new SpawnTimer[MAX_PLAYERS]; //At top of script
public OnPlayerSpawn(playerid)
{
new Float:X, Float:Y, Float:Z;
GetPlayerPos(playerid, X ,Y ,Z):
SetPlayerPos(playerid, X, Y, Z + 2);
TogglePlayerControllable(playerid,0);
SpawnTimer[playerid] = SetTimerEx("unfreezetimer", 2000, 0, "i", playerid);//Timer to unfreeze player
}
forward unfreezetimer(playerid);
public unfreezetimer(playerid)
{
TogglePlayerControllable(playerid,1);
}
public OnPlayerDisconnect(playerid, reason)
{
KillTimer(SpawnTimer[playerid]);
return 1;
}
Copied IceBillizard code and modified.
Re: Help with freezin -
IceBilizard - 05.11.2015
You can freeze them when they logged in so they can't move it.
Re: Help with freezin -
CraTzy - 05.11.2015
Quote:
Originally Posted by IceBilizard
You can freeze them when they logged in so they can't move it.
|
player login on connect
After that if map round started he going to play the map if he come late while other plays he spectate
i just want to freeze the cars :/
Re: Help with freezin -
Ritzy2K - 05.11.2015
Explain more please.
Re: Help with freezin -
CraTzy - 05.11.2015
so its a large EDM map from MTA
many maps laggers fall down and they cant play the map
so i would like to make something to freeze player pos , vehicle pos on 5 sec
when map starts player is already in car as driver but lagers can fall down