Help me with freezing player while mapping loading -
IbeatS - 16.01.2014
Hello,I want code to put it in,my script to freeze,the player while the maping is loading to avoid bugs ,thanks
Re: Help me with freezing player while mapping loading -
MatriXgaMer - 16.01.2014
pawn Код:
CMD:freeze(playerid, params[])
{
if(IsPlayerAdmin(playerid))//is player rcon to freeze players
{
new pID;
if(sscanf(params, "u", pID))return SendClientMessage(playerid, COLOR_WHITE, "Syntax: /freeze [PlayerID/Name]");
TogglePlayerControlable(pID, 1);
}
return 1;
}
Just made the command havent time to make it "pro"
Re: Help me with freezing player while mapping loading -
IbeatS - 16.01.2014
How to make the command havn't time ? ,I am so sorry for asking alot,and when I put this code in pawn I put it for one time or before each mapping ?
Re: Help me with freezing player while mapping loading -
Sojo12 - 16.01.2014
What you want to put is like a Timer Teleportation..Like when a player uses a cmd to get TPed somewhere he freezes auto-matically and then load the objects and unfreeze the player after everything has been loaded?
Re: Help me with freezing player while mapping loading -
IbeatS - 16.01.2014
Can I gave u the gamemode and u put it for me,cuz it make 4 error
Re: Help me with freezing player while mapping loading -
Sojo12 - 16.01.2014
What GM is it?
Re: Help me with freezing player while mapping loading -
amirab - 16.01.2014
On the top of script :
PHP код:
forward PlayerControllableAfterSpawn(playerid);
Everywhere you want
:
PHP код:
stock SetPlayerPosEx(playerid, Float:X, Float:Y, Float:Z, interiorid = 0)
{
SetPlayerPos(playerid, X, Y, Z+0.5), SetPlayerInterior(playerid, interiorid);
TogglePlayerControllable(playerid, false);
GameTextForPlayer(playerid , "Please Wait..." , 3000, 5);
SetPlayerVirtualWorld(playerid , 54);
SetTimerEx("PlayerControllableAfterSpawn", 500, 0, "i", playerid);
return 1;
}
public PlayerControllableAfterSpawn(playerid)
{
TogglePlayerControllable(playerid , 1);
SetPlayerVirtualWorld(playerid , 0);
return 1;
}
and then use SetPlayerPosEx for spawning
Re: Help me with freezing player while mapping loading -
IbeatS - 16.01.2014
Quote:
Originally Posted by amirab
On the top of script :
PHP код:
forward PlayerControllableAfterSpawn(playerid);
Everywhere you want :
PHP код:
stock SetPlayerPosEx(playerid, Float:X, Float:Y, Float:Z, interiorid = 0)
{
SetPlayerPos(playerid, X, Y, Z+0.5), SetPlayerInterior(playerid, interiorid);
TogglePlayerControllable(playerid, false);
GameTextForPlayer(playerid , "Please Wait..." , 3000, 5);
SetPlayerVirtualWorld(playerid , 54);
SetTimerEx("PlayerControllableAfterSpawn", 500, 0, "i", playerid);
return 1;
}
public PlayerControllableAfterSpawn(playerid)
{
TogglePlayerControllable(playerid , 1);
SetPlayerVirtualWorld(playerid , 0);
return 1;
}
and then use SetPlayerPosEx for spawning
|
C:\Users\Hossam\Desktop\New Folder (2)\New Folder\Italy Mafia Vers6\gamemodes\IMV6.pwn(29129) : error 025: function heading differs from prototype
C:\Users\Hossam\Desktop\New Folder (2)\New Folder\Italy Mafia Vers6\gamemodes\IMV6.pwn(29130) : error 021: symbol already defined: "SetPlayerPosEx"
Re: Help me with freezing player while mapping loading -
amirab - 16.01.2014
On the top of script :
PHP код:
forward PlayerControllableAfterSpawn(playerid);
Everywhere you want
:
PHP код:
stock SetPlayerPosEx2(playerid, Float:X, Float:Y, Float:Z, interiorid = 0)
{
SetPlayerPos(playerid, X, Y, Z+0.5), SetPlayerInterior(playerid, interiorid);
TogglePlayerControllable(playerid, false);
GameTextForPlayer(playerid , "Please Wait..." , 3000, 5);
SetPlayerVirtualWorld(playerid , 54);
SetTimerEx("PlayerControllableAfterSpawn", 500, 0, "i", playerid);
return 1;
}
public PlayerControllableAfterSpawn(playerid)
{
TogglePlayerControllable(playerid , 1);
SetPlayerVirtualWorld(playerid , 0);
return 1;
}
and then use
SetPlayerPosEx2 for spawning
Re: Help me with freezing player while mapping loading -
IbeatS - 16.01.2014
It shows no error but it didn't freeze the player ,I want the player got,freeze for 4 second when he enter anywhere or tped or spawned or jailed