26.01.2016, 12:32
Hello guys.
Introduction:
I made a script for my admin's jail system that saves the name of the admin who jailed the player, and the reason.
Each time the jailed player connect to the server, he's getting a message informing him that he's in jail and the reason etc..
Issue:
Everything works all right, but when the system's info data are saved into a file the script can't read the latest reason so it doesn't give us the jail's infomation.
Codes:
For saving the info's into a file :
Question :
Could I replace the strings each time I re-jail the player?
Introduction:
I made a script for my admin's jail system that saves the name of the admin who jailed the player, and the reason.
Each time the jailed player connect to the server, he's getting a message informing him that he's in jail and the reason etc..
Issue:
Everything works all right, but when the system's info data are saved into a file the script can't read the latest reason so it doesn't give us the jail's infomation.
Codes:
For saving the info's into a file :
PHP код:
if(SavedAdminTime[playerid] != 0)
{
new INI:File = INI_Open(players_jailed(playerid));
INI_SetTag(File, "Informations");
INI_WriteString(File, "Administrateur", jailed[playerid][administrateur]);
INI_WriteString(File, "Raison", jailed[playerid][reason_jailed]);
INI_Close(File);
}
PHP код:
PUBLIC:loadjail_user(playerid, name[], value[])
{
INI_String("Administrateur", jailed[playerid][administrateur], 24);
INI_String("Raison", jailed[playerid][reason_jailed], 128);
return true;
}
Could I replace the strings each time I re-jail the player?