Jump to content
  • 0

Problema Gold


..H3AtonN..

Question

Problema intalnita (descriere): Deci,pe serverul meu,este un sistem cu gold/shop.Adica scrii /gold/shop,si iti da un tabel cu ce poti cumpara etc...Problema este ca daca dau un restart la server,sau daca acel player iese de pe server,sau intra,ii dispare gold-ul,si nu-l mai are..adica nu ramane gold-ul..
Ero(area / rile) / warning-(ul / urile): -
Liniile de cod / sursa / script-ul(obligatoriu): Nu stiu ce sa dau..Spuneti-mi voi ce trebuie sa va dau.
Imagini / Video (optional): -
Ati incercat sa rezolvati singur?:  Nu stiu ce sa fac,Va rog help,cine ma ajuta cu asta,o sa-i dau admin 3 pe serverul meu,

Link to comment
Share on other sites

15 answers to this question

Recommended Posts

  • 0
1 oră în urmă, eNeR. a spus:

Nu este din comanda , da-mi add pe skype game.vido te ajut eu.

gata

CMD:givegold(playerid, params[])
{
    new giveplayerid, splayer[25], gold;
    if(gLogged[playerid] == 0) return SendClientMessage(playerid, COLOR_ERROR, "Tu nu esti logat si nu poti sa folosesti aceasta comanda!");
    if(PlayerInfo[playerid][pAdmin] < 6) return SendClientMessage(playerid, COLOR_ERROR, "Nu ai gradul necesar ca sa folosesti aceasta comanda!");
    if(sscanf(params,"s[25]i",splayer,gold)) return SendClientMessage(playerid, COLOR_SYN, "Tasteaza:{FFFFFF} /givegold <Player ID/Name> <amount>");
    {
        if(GetPlayers(splayer) == INVALID_PLAYER_ID) return InvalidPlayer(playerid);
        else if(GetPlayers(splayer) == 1000) return ToManyResults(playerid);
        else if(GetPlayers(splayer) == 1001) return ShowResults(playerid, splayer);
        else giveplayerid = GetPlayers(splayer);
        format(gString, sizeof(gString), "%s has given %s gold to %s.",GetName(playerid),FormatNumber(gold),GetName(giveplayerid));
        CMDRaport(gString, 6, 0);
        PlayerInfo[giveplayerid][pGold] += gold;
        Update(giveplayerid, pGoldx);
    }
    return 1;
}

Acum 2 ore, Chuck_James a spus:

Arata comanda care oferă jucătorului Gold.

ai mai sus comanda

Acum 10 ore, Alberto. a spus:

Adica salvezi cumva gold-ul? 

Frate,nu am cum..deci dau /givegold 0 100,si id 0 are 100 gold,el daca iese de pe server,si intra iara,nu mai are nici un gold..asta e marea problema..si nu stiu ce sa-i fac..ca mai am bugul asta,si inca 1,si ii dau drumu la server,si oricum tie,o sa-ti dau admin 4,ca chiar m-ai ajutat..

Link to comment
Share on other sites

  • 0

CMD:givegold(playerid, params[])
{
    new giveplayerid, splayer[25], gold;
    if(gLogged[playerid] == 0) return SendClientMessage(playerid, COLOR_ERROR, "Tu nu esti logat si nu poti sa folosesti aceasta comanda!");
    if(PlayerInfo[playerid][pAdmin] < 6) return SendClientMessage(playerid, COLOR_ERROR, "Nu ai gradul necesar ca sa folosesti aceasta comanda!");
    if(sscanf(params,"s[25]i",splayer,gold)) return SendClientMessage(playerid, COLOR_SYN, "Tasteaza:{FFFFFF} /givegold <Player ID/Name> <amount>");
    {
        if(GetPlayers(splayer) == INVALID_PLAYER_ID) return InvalidPlayer(playerid);
        else if(GetPlayers(splayer) == 1000) return ToManyResults(playerid);
        else if(GetPlayers(splayer) == 1001) return ShowResults(playerid, splayer);
        else giveplayerid = GetPlayers(splayer);
        format(gString, sizeof(gString), "%s has given %s gold to %s.",GetName(playerid),FormatNumber(gold),GetName(giveplayerid));
        CMDRaport(gString, 6, 0);
        PlayerInfo[giveplayerid][pGold] += gold;
        Update(giveplayerid, pGold);
    }
    return 1;
}

 

Dacă nu merge cauta în baza de date tabelul pGold.

Link to comment
Share on other sites

  • 0
Acum 57 minute, Chuck_James a spus:

CMD:givegold(playerid, params[])
{
    new giveplayerid, splayer[25], gold;
    if(gLogged[playerid] == 0) return SendClientMessage(playerid, COLOR_ERROR, "Tu nu esti logat si nu poti sa folosesti aceasta comanda!");
    if(PlayerInfo[playerid][pAdmin] < 6) return SendClientMessage(playerid, COLOR_ERROR, "Nu ai gradul necesar ca sa folosesti aceasta comanda!");
    if(sscanf(params,"s[25]i",splayer,gold)) return SendClientMessage(playerid, COLOR_SYN, "Tasteaza:{FFFFFF} /givegold <Player ID/Name> <amount>");
    {
        if(GetPlayers(splayer) == INVALID_PLAYER_ID) return InvalidPlayer(playerid);
        else if(GetPlayers(splayer) == 1000) return ToManyResults(playerid);
        else if(GetPlayers(splayer) == 1001) return ShowResults(playerid, splayer);
        else giveplayerid = GetPlayers(splayer);
        format(gString, sizeof(gString), "%s has given %s gold to %s.",GetName(playerid),FormatNumber(gold),GetName(giveplayerid));
        CMDRaport(gString, 6, 0);
        PlayerInfo[giveplayerid][pGold] += gold;
        Update(giveplayerid, pGold);
    }
    return 1;
}

Am bagat asta,si tot imi dispare..

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.