Help yini
#1

Can someone help me with this? I just don't know how to save player's crime reason and how to load it, I tried with:

pawn Код:
CMD:makewanted(playerid,params[])
{
    new name[MAX_PLAYER_NAME], reason[128];
    if(!sscanf(params,"ss[" #MAX_PLAYER_NAME "]", name,reason))
    {
        new INI:File = INI_Open(UserPath(playerid));
        INI_WriteString(File,"Crime",reason);
    }
    return 1;
}
Sure it's not working cuz to be honest idk how to do that but I tried at least :F
Can someone show me proper way to do that?
Reply
#2

Guys I need help with this seriously... can't figure out alone how can I save player's crimes and load them.
Reply
#3

Код:
INI_Close(File);
Reply
#4

Quote:
Originally Posted by Lajko1
Посмотреть сообщение
Can someone help me with this? I just don't know how to save player's crime reason and how to load it, I tried with:

pawn Код:
CMD:makewanted(playerid,params[])
{
    new name[MAX_PLAYER_NAME], reason[128];
    if(!sscanf(params,"ss[" #MAX_PLAYER_NAME "]", name,reason))
    {
        new INI:File = INI_Open(UserPath(playerid));
        INI_WriteString(File,"Crime",reason);
    }
    return 1;
}
Sure it's not working cuz to be honest idk how to do that but I tried at least :F
Can someone show me proper way to do that?
Just put on your load data function,callback,stock or whatever you have the wanted's variable then it will load the stats when the player joins
Reply
#5

Well that's working somehow I wanted, at least it saves a "text" i wrote, how can I load that and display it in SendClientMessage?
So it will say for example: Your crimes are: *crimes here*
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)