Cell spawn not working.
#1

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;
    }
I set this onplayerspawn, so when the player logs in and he's jailed he goes back to his cell and sets his time to when he logged out.

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;
}
Other things as FBI and LSPDRank load up correctly, but cells and FPrison values are ignored.
Reply


Messages In This Thread
Cell spawn not working. - by stix - 05.11.2012, 20:17
Re: Cell spawn not working. - by Stu1 - 05.11.2012, 21:04
Respuesta: Cell spawn not working. - by stix - 05.11.2012, 22:04
Re: Cell spawn not working. - by Stu1 - 05.11.2012, 22:42
Respuesta: Cell spawn not working. - by stix - 05.11.2012, 23:41
Respuesta: Cell spawn not working. - by stix - 06.11.2012, 15:58
Re: Cell spawn not working. - by Smally - 06.11.2012, 16:35
Respuesta: Cell spawn not working. - by stix - 06.11.2012, 16:50
Re: Cell spawn not working. - by Smally - 06.11.2012, 17:29
Respuesta: Cell spawn not working. - by stix - 06.11.2012, 20:37

Forum Jump:


Users browsing this thread: 4 Guest(s)