Need help on Helpers
#1

If i restart my Sever it don't wanna Save,can i have it like in my scriptfiles? Helper 0 for no,Helper 1 for Yes.i wanna save it under scriptfiles
Code:
COMMAND:sethelper(playerid, params[])
{
    new pID, str[128];
    if(!IsPlayerAdmin(playerid))
    return SendClientMessage(playerid, -1, "Only admins can use this command.");
    if(sscanf(params,"u", pID))
    return SendClientMessage(playerid,-1,"USAGE: /sethelper [PlayerID]");
    if(!IsPlayerConnected(pID))
    return SendClientMessage(playerid, -1, "ERROR: Selected player is not connected.");
    if(playerHelper[pID])
    return SendClientMessage(playerid, -1, "Selected player is a helper already.");
    new name[MAX_PLAYER_NAME+1], pName[MAX_PLAYER_NAME+1];
    GetPlayerName(pID, name, sizeof name);
    GetPlayerName(playerid, pName, sizeof pName);
    playerHelper[pID] = true;
    format(str, sizeof str, "Admin %s made you a helper.", pName);
    SendClientMessage(pID, -1, str);
    format(str, sizeof str, "You made %s a helper.", name);
    SendClientMessage(playerid, -1, str);
    return 1;
}
Reply
#2

Have you even created a saving system?
Reply
#3

yea it comes with the gamemode
Reply
#4

You must make a command for restarting your server (not rcon command, but you-made-command)
It went like this

Code:
COMMAND:rcongmx(playerid, params[])
{
    /* Place your saving function here 
    ex : INI_WriteBool(UserData, "Helper", playerHelper[pID]) <<-- for Y_INI, change to your setting */
    SendRconCommand("gmx");
    return 1;
}
Reply
#5

Y_INI is ysi
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)