Bugged world when getting out of jail
#1

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

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.
Reply
#3

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);

Reply
#4

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(iCOLOR_YELLOW," You have paid your debt to society. If bugged VW, walk to the Police Department icon behind you. and /enter and /exit");
format(stringsizeof(string), "~g~Freedom~n~~w~Try to be a better citizen");
GameTextForPlayer(istring50001);
SetCameraBehindPlayer(i);
TogglePlayerControllable(i1);
ClearCrime(i);
SetPlayerToTeamColor(i);
SetPlayerInterior(playerid0);
SetPlayerVirtualWorld(playerid0); 
Reply
#5

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(iCOLOR_YELLOW," You have paid your debt to society. If bugged VW, walk to the Police Department icon behind you. and /enter and /exit");
format(stringsizeof(string), "~g~Freedom~n~~w~Try to be a better citizen");
GameTextForPlayer(istring50001);
SetCameraBehindPlayer(i);
TogglePlayerControllable(i1);
ClearCrime(i);
SetPlayerToTeamColor(i);
SetPlayerInterior(playerid0);
SetPlayerVirtualWorld(playerid0); 
It did not work. the server wont start when adding that.
Reply
#6

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(iCOLOR_YELLOW," You have paid your debt to society. If bugged VW, walk to the Police Department icon behind you. and /enter and /exit"); 
format(stringsizeof(string), "~g~Freedom~n~~w~Try to be a better citizen"); 
GameTextForPlayer(istring50001); 
SetCameraBehindPlayer(i); 
TogglePlayerControllable(i1); 
ClearCrime(i); 
SetPlayerToTeamColor(i); 
SetPlayerInterior(i0); 
SetPlayerVirtualWorld(i0); 
Reply
#7

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(iCOLOR_YELLOW," You have paid your debt to society. If bugged VW, walk to the Police Department icon behind you. and /enter and /exit"); 
format(stringsizeof(string), "~g~Freedom~n~~w~Try to be a better citizen"); 
GameTextForPlayer(istring50001); 
SetCameraBehindPlayer(i); 
TogglePlayerControllable(i1); 
ClearCrime(i); 
SetPlayerToTeamColor(i); 
SetPlayerInterior(i0); 
SetPlayerVirtualWorld(i0); 
Looks like it work. Got 0 errors on compiling it. will test it ingame now! Added reputation to you
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)