Help with freezin
#1

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
Reply
#2

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;
}
Reply
#3

not work , players spawn in vehicle and the position moves :/ i need to freez them in Sky or dedicated pos
Reply
#4

PHP код:
new SpawnTimer[MAX_PLAYERS]; //At top of script
public OnPlayerSpawn(playerid)
{
     new 
Float:XFloat:YFloat:Z;
     
GetPlayerPos(playerid,,Z):
     
SetPlayerPos(playeridXY2);
     
TogglePlayerControllable(playerid,0);
     
SpawnTimer[playerid] = SetTimerEx("unfreezetimer"20000"i"playerid);//Timer to unfreeze player
}
forward unfreezetimer(playerid);
public 
unfreezetimer(playerid)
{
       
TogglePlayerControllable(playerid,1);
}
public 
OnPlayerDisconnect(playeridreason)
{
       
KillTimer(SpawnTimer[playerid]);
        return 
1;

Copied IceBillizard code and modified.
Reply
#5

You can freeze them when they logged in so they can't move it.
Reply
#6

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 :/
Reply
#7

Explain more please.
Reply
#8

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
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)