Jump to content
  • 0

Problema cod pawno


Doinel Costache

Question

Salutare, incerc sa invat pawno si nu inteleg ceva la codul asta.

In joc nu imi afiseaza numele jucatorului cand apare mesajul asta "Jucatorul %s are deja suma de bani pe care incerci sa i-o setezi" . Adica unde am scris eu acolo "%s" nu inlocuieste in joc cu numele jucatorului caruia vreau sa ii setez banii.

CMD:setmoney(playerid, params[])
{
    new target;
    new money;
    if(sscanf(params, "ui", target, money)) return SendClientMessage(playerid, 0x66CC66FF, "USAGE: /setmoney [playerid] [amount]");
    {
        if(GetPlayerMoney(playerid) == money)
        {
        new string2[128];
        format(string2, sizeof(string2), "Jucatorul %s are deja suma de bani pe care incerci sa i-o setezi", target);
        SendClientMessage(playerid, 0x66CC66FF,string2);
        }
        else if(GetPlayerMoney(playerid) != money)
        {
        ResetPlayerMoney(target);
        GivePlayerMoney(target, money);
        new string[128];
        format(string, sizeof(string), "Un Administrator ti-a setat banii la %d$", money);
        SendClientMessage(target, 0x66CC66FF,string);
        }
      return 1;
    }
}

Link to comment
Share on other sites

7 answers to this question

Recommended Posts

  • 0

@Doinel Costache

 

Poftim

 

format(string2, sizeof(string2), "Jucatorul %s are deja suma de bani pe care incerci sa i-o setezi", GetName(target));

 

  • Like 1

Ce inseamna cuvantul "Unic" este atunci cand Chestia / Obiectul / Idea / etc... nu exista in alta parte.

Copii, nu mai veniti cu vorbe de "Am gamemode unic", nu exista asa ceva, la ora actuala totul este pe net.

Aveti grija pe cine ajutati, majoritatea sunt caini.

Link to comment
Share on other sites

  • 0
Acum 2 ore, Doinel Costache a spus:

@StrikerM

Nu imi merge cu GetName uite codu.

stock GetName(playerid) {
new name[MAX_PLAYERS_NAME];  ---aici e randu 249 pe care iau erori
GetPlayerName(playerid, name, sizeof(name));
return name;
}

ooops.png

new name[MAX_PLAYERS_NAME];

Pune asa 

new name[MAX_PLAYER_NAME];

 Încearcă să fii un om de valoare și nu neapărat un om de succes.

 

Link to comment
Share on other sites

  • 0
Acum 6 ore, Doinel Costache a spus:

@StrikerM

Nu imi merge cu GetName uite codu.

stock GetName(playerid) {
new name[MAX_PLAYERS_NAME];  ---aici e randu 249 pe care iau erori
GetPlayerName(playerid, name, sizeof(name));
return name;
}

ooops.png

Pune 25 nu MAX_PLAYERS_NAME.

Ce inseamna cuvantul "Unic" este atunci cand Chestia / Obiectul / Idea / etc... nu exista in alta parte.

Copii, nu mai veniti cu vorbe de "Am gamemode unic", nu exista asa ceva, la ora actuala totul este pe net.

Aveti grija pe cine ajutati, majoritatea sunt caini.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Answer this question...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.