Save jailer name
#1

Hello guys,
Today, I've made a command which I can get the name of Admin who jailed a player and the reason of it.
It works perfectly, but the main problem that when the player's disconnect, and reconnect, I can't get the name of the admin and the reason. THO..

this is the command to view players in jail :

PHP код:
dcmd_prison(playerid,params[])
{
    
#pragma unused params
    
new string[170];
    
SendClientMessage(playerid,COLOR_DEADCONNECT,"[[_PRISON_]]");
    for(new 
i=0i<MAX_PLAYERSi++)
    {
        if(
IsPlayerConnected(i))
        {
            if(
JailAdminTime[i] >= 1)
            {
                
format(string,sizeof(string),"[PRISON ADMIN] {FFFFFF}%s(%d): Emprisonnй par: {FF0000}%s {FFFFFF}Raison: {FF0000}%s.",PlayerName(i),i,jailed[i][administrateur],jailed[i][reason_jailed]);
                
SendClientMessage(playerid,COLOR_LIGHTBLUE,string);
            }
        }
    }
    return 
1;

Reply
#2

You locally save it, but you do not write the strings out to somewhere. Perhaps link it up with a database and have the command to write in there?
Reply
#3

I'm not using MYSQL for my server, I'm using dutil as a registration system.
Reply
#4

Where does it save? I can't seem to figure that out in your command.
Reply
#5

Hm.. Actually I'm using dudb for registration system as I said, so I don't know how to save it as a string. However, I have the enum for it.
Reply
#6

Quote:
Originally Posted by KillerDVX
Посмотреть сообщение
Hm.. Actually I'm using dudb for registration system as I said, so I don't know how to save it as a string. However, I have the enum for it.
Hmm.. I've not yet used that to register anything. Perhaps there's some info in the documentation? Right now, you can't recall anything, as the system is not writing it out. When the user logs out, his data is lost ( as-in who jailed him/her ). You have to find a fix for that.
Reply
#7

That what I'm searching for.. a way to save my reason as a string..
Reply
#8

Hmm.. perhaps convert it into a string, and save that string to an external file? You might be able to read it out.. I'd suggest to start working with SQL, as it's faster and can be safer.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)