05.11.2012, 20:17
pawn Код:
if(Cell[playerid] == 1 && countn[playerid] >= 1 && FPrison[playerid] == 1)
{
SetPlayerInterior(playerid, 20);
SetPlayerPos(playerid, 1799.6770,-1552.7550,5700.4287);
SetPlayerFacingAngle(playerid, 269.2757);
new message[128];
SendClientMessage(playerid, GRAY, "You still have time to serve in prison.");
format(message, sizeof(message), "You will be released in %d minutes.", countn[playerid]);
SendClientMessage(playerid, GRAY, message);
ResetPlayerWeapons(playerid);
SetPlayerHealth(playerid, 100);
SetPlayerArmour(playerid, 0);
timer[playerid]=SetTimerEx("Unjailed",countn[playerid]*60000,false,"i",playerid);
return 1;
}
Thing is, player can spawn normally even if he's jailed at his spawn ongamemodeinit, i'll give you the information so you can check the problem.
pawn Код:
new INI:File = INI_Open(UserPath(playerid));
INI_SetTag(File,"PlayerData");
INI_WriteInt(File,"LSPDRank",PlayerData[playerid][LSPDRank]);
INI_WriteInt(File,"FBIRank",PlayerData[playerid][FBIRank]);
INI_WriteInt(File,"Cells",Cell[playerid]);
INI_WriteInt(File,"FPrison",FPrison[playerid]);
INI_WriteInt(File,"Jailed",Jailed[playerid]);
INI_WriteInt(File,"Jailed2",Jailed2[playerid]);
INI_WriteInt(File,"FBIJailed",FBIJailed[playerid]);
INI_WriteInt(File,"FBIJailed2",FBIJailed2[playerid]);
INI_WriteInt(File,"Wanted",PlayerData[playerid][Wanted]);
INI_Close(File);
pawn Код:
forward LoadUser_data(playerid,name[],value[]);
public LoadUser_data(playerid,name[],value[])
{
INI_String("Password",PlayerData[playerid][Pass], 129);
INI_Int("LSPDRank",PlayerData[playerid][LSPDRank]);
INI_Int("FBIRank",PlayerData[playerid][FBIRank]);
INI_Int("Cells",Cell[playerid]);
INI_Int("FPrison",FPrison[playerid]);
INI_Int("Jailed",Jailed[playerid]);
INI_Int("Jailed2",Jailed2[playerid]);
INI_Int("FBIJailed",FBIJailed[playerid]);
INI_Int("FBIJailed2",FBIJailed2[playerid]);
INI_Int("Wanted",PlayerData[playerid][Wanted]);
return 1;
}