Jump to content
  • 0

Problema comanda


serbansubs

Question

Buna SA-MP.ro,am o problmea la o comanda:

[pawn]ALTCOMMAND:savedata->saveaccounts;

COMMAND:saveaccounts(playerid, params[])

{

    if (GetPVarInt(playerid, "PlayerLogged") == 0) return SendClientMessage(playerid, COLOR_WHITE, "You must be logged in to use this.");

    if(!AdminUser(playerid)) return SendClientMessage(playerid, COLOR_GREY, "You need to create a admin user, /admincreate.");

    if(GetPVarInt(playerid, "AdminLogged") == 0) return SendClientMessage(playerid, COLOR_GREY, "You need to login into your admin account, /adminlogin.");

    if(GetPVarInt(playerid, "Admin") >= 7)

    {

        foreach (Player,i)

        {

            OnPlayerDataSave(i);

        }

        SaveBizz();

        SaveProperty();

        SaveCars();

        SaveFactions();

        SaveInts();

        SaveTags();

        SaveNormalCars();

        SaveCars2();

    }

    else SendClientMessage(playerid, COLOR_LIGHTRED, "You do not have access to this command !");

    return 1;

}[/pawn]

Practic comanda ar trebuii sa salveze conturile,eu dupa ce inchid server-ul pe windows mi se salveaza tot,dupa ce inchid server-ul pe host (Linux) ramane din pozitia in care am uploadat pe host,ultima varianta de pe linux. Am sperat ca comanda o sa-mi rezolve problema...nu se intampla nimic,banuiesc ca e ceva gresit in ea(Nu realizez ce).Apreciez un eventual ajutor.Multumesc anticipat.

Link to comment
Share on other sites

2 answers to this question

Recommended Posts

Noroc,

Din ce insinuezi tu acolo, reprezinta ca o functie nu functioneaza bine ... [Probabil ai Uitat sa Urci ceva pe Host],

Te-ai uitat la functia

[pawn]

public OnPlayerUpdateEx(playerid)

[/pawn]

Sa vezi de unde se iau datele?

OFF: Si de ce te complici cu cmd. sa se salveze ceva.. Exista

[pawn]

OnPlayerLogin(playerid,password[]);

OnPlayerUpdateEx(playerid);

OnPlayerRegister(playerid, password[]);

[/pawn]

Care te scuteste de toate astea..

Link to comment
Share on other sites

Guest
This topic is now closed to further replies.
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue. For more details you can also review our Terms of Use and Privacy Policy.