Bugged world when getting out of jail -
tomacraft2011 - 31.01.2017
Hello, i have my own server. and if i jail people or police jail them. when they are done serving time in jail they spawn outside pd station. but the world is bugged. they can see trought the buildings etc. does someone have a fix for this? thanks!
Re: Bugged world when getting out of jail -
AndreiWow - 31.01.2017
Use SetPlayerInterior(playerid, 0);
and
SetPlayerVirtualWorld(playerid, 0);
at the function that takes him out or above the message that tells him that he is out of jail.
Re: Bugged world when getting out of jail -
tomacraft2011 - 31.01.2017
Quote:
Originally Posted by AndreiWow
Use SetPlayerInterior(playerid, 0);
and
SetPlayerVirtualWorld(playerid, 0);
at the function that takes him out or above the message that tells him that he is out of jail.
|
you mean this?
Quote:
/* if(PlayerInfo[playerid][pJailed] == 3)
{
SetPlayerPos(playerid, -1070.8547,-2040.0,49.144 ;
SetPlayerWorldBounds(playerid, 20000.0, -20000.0, 20000.0, -20000.0);
TogglePlayerControllable(playerid, 1);
SetCameraBehindPlayer(playerid);
}*/
PlayerInfo[i][pJailed] = 0;
SendClientMessage(i, COLOR_YELLOW," You have paid your debt to society. If bugged VW, walk to the Police Department icon behind you. and /enter and /exit");
format(string, sizeof(string), "~g~Freedom~n~~w~Try to be a better citizen");
GameTextForPlayer(i, string, 5000, 1);
SetCameraBehindPlayer(i);
TogglePlayerControllable(i, 1);
ClearCrime(i);
SetPlayerToTeamColor(i);
|
Re: Bugged world when getting out of jail -
AndreiWow - 31.01.2017
Quote:
Originally Posted by tomacraft2011
you mean this?
|
PHP код:
/* if(PlayerInfo[playerid][pJailed] == 3)
{
SetPlayerPos(playerid, -1070.8547,-2040.0,49.144;
SetPlayerWorldBounds(playerid, 20000.0, -20000.0, 20000.0, -20000.0);
TogglePlayerControllable(playerid, 1);
SetCameraBehindPlayer(playerid);
}*/
PlayerInfo[i][pJailed] = 0;
SendClientMessage(i, COLOR_YELLOW," You have paid your debt to society. If bugged VW, walk to the Police Department icon behind you. and /enter and /exit");
format(string, sizeof(string), "~g~Freedom~n~~w~Try to be a better citizen");
GameTextForPlayer(i, string, 5000, 1);
SetCameraBehindPlayer(i);
TogglePlayerControllable(i, 1);
ClearCrime(i);
SetPlayerToTeamColor(i);
SetPlayerInterior(playerid, 0);
SetPlayerVirtualWorld(playerid, 0);
Re: Bugged world when getting out of jail -
tomacraft2011 - 31.01.2017
Quote:
Originally Posted by AndreiWow
PHP код:
/* if(PlayerInfo[playerid][pJailed] == 3)
{
SetPlayerPos(playerid, -1070.8547,-2040.0,49.144;
SetPlayerWorldBounds(playerid, 20000.0, -20000.0, 20000.0, -20000.0);
TogglePlayerControllable(playerid, 1);
SetCameraBehindPlayer(playerid);
}*/
PlayerInfo[i][pJailed] = 0;
SendClientMessage(i, COLOR_YELLOW," You have paid your debt to society. If bugged VW, walk to the Police Department icon behind you. and /enter and /exit");
format(string, sizeof(string), "~g~Freedom~n~~w~Try to be a better citizen");
GameTextForPlayer(i, string, 5000, 1);
SetCameraBehindPlayer(i);
TogglePlayerControllable(i, 1);
ClearCrime(i);
SetPlayerToTeamColor(i);
SetPlayerInterior(playerid, 0);
SetPlayerVirtualWorld(playerid, 0);
|
It did not work. the server wont start when adding that.
Re: Bugged world when getting out of jail -
AndreiWow - 31.01.2017
My bad, use this
PHP код:
/* if(PlayerInfo[playerid][pJailed] == 3)
{
SetPlayerPos(playerid, -1070.8547,-2040.0,49.144;
SetPlayerWorldBounds(playerid, 20000.0, -20000.0, 20000.0, -20000.0);
TogglePlayerControllable(playerid, 1);
SetCameraBehindPlayer(playerid);
}*/
PlayerInfo[i][pJailed] = 0;
SendClientMessage(i, COLOR_YELLOW," You have paid your debt to society. If bugged VW, walk to the Police Department icon behind you. and /enter and /exit");
format(string, sizeof(string), "~g~Freedom~n~~w~Try to be a better citizen");
GameTextForPlayer(i, string, 5000, 1);
SetCameraBehindPlayer(i);
TogglePlayerControllable(i, 1);
ClearCrime(i);
SetPlayerToTeamColor(i);
SetPlayerInterior(i, 0);
SetPlayerVirtualWorld(i, 0);
Re: Bugged world when getting out of jail -
tomacraft2011 - 31.01.2017
Quote:
Originally Posted by AndreiWow
My bad, use this
PHP код:
/* if(PlayerInfo[playerid][pJailed] == 3)
{
SetPlayerPos(playerid, -1070.8547,-2040.0,49.144;
SetPlayerWorldBounds(playerid, 20000.0, -20000.0, 20000.0, -20000.0);
TogglePlayerControllable(playerid, 1);
SetCameraBehindPlayer(playerid);
}*/
PlayerInfo[i][pJailed] = 0;
SendClientMessage(i, COLOR_YELLOW," You have paid your debt to society. If bugged VW, walk to the Police Department icon behind you. and /enter and /exit");
format(string, sizeof(string), "~g~Freedom~n~~w~Try to be a better citizen");
GameTextForPlayer(i, string, 5000, 1);
SetCameraBehindPlayer(i);
TogglePlayerControllable(i, 1);
ClearCrime(i);
SetPlayerToTeamColor(i);
SetPlayerInterior(i, 0);
SetPlayerVirtualWorld(i, 0);
|
Looks like it work. Got 0 errors on compiling it. will test it ingame now! Added reputation to you