Jump to content

Recommended Posts

Posted

Salut boiz
kum fac comanda nre ?? ?? ??  // 

ita aici kum am fakut komanda /n da pe nre nuj kum sho fac

imi zike cnv?

Citat

CMD:n(playerid, params[])
{
    if(P_Data[playerid][pHelper] > 1)
        return SCM(playerid, color_gray, "Faci parte din staff deja!");
    
    if(P_Data[playerid][pAdmin] > 1)
        return SCM(playerid, color_gray, "Faci parte din staff deja!");    
    
    if(IntrebareON[playerid] == 1)
        return SCM(playerid, color_gray, "Ai deja o intrebare pusa!");
        
    new intrebare[64],string[64];
    if(sscanf(params, "s[64]", intrebare))
        return SCM(playerid, color_gray, "Folosire: /n <intrebare/question>");
    
    SCM(playerid, color_yellow, "Ai pus o intrebare ! Asteapta pana raspunde un helper.");
    IntrebareON[playerid] = 1;
    
    format(string, sizeof(string), "%s[%d] a pus intrebarea: %s", GetName(playerid), playerid, intrebare);
    SendHelperMessage(color_anunt, string);
    
    return 1;
}

 

Posted (edited)

Presupun ca asta vrei sa faci (/nre id raspuns).

// Pe undeva prin gamemode (inainte de comanda /n) adaugi:
new NText[MAX_PLAYERS][64];

// La comanda /n pui urmatoarea linie pe undeva pe la final:
format(NText[playerid], 64, intrebare);

CMD:nre(playerid, params[])
{
    if(P_Data[playerid][pHelper] == 0 && P_Data[playerid][pAdmin] == 0) 
        return SCM(playerid, color_gray, "Nu ai acces la aceasta comanda!");
        
    new id, raspuns[64];
    if(sscanf(params, "us[64]", id, raspuns))
        return SCM(playerid, color_gray, "Folosire: /nre <nume/id> <raspuns/answer>");

    if(IntrebareON[id] == 0)
        return SCM(playerid, color_gray, "Acel jucator nu a pus o intrebare.");

    new string[128];
    format(string, sizeof(string), "%s[%d] a intrebat: %s", GetName(id), id, NText[id]);
    SendClientMessageToAll(color_anunt, string);
          
    format(string, sizeof(string), "%s[%d] a raspuns: %s", GetName(playerid), playerid, raspuns);
    SendClientMessageToAll(color_anunt, string);          
    
    IntrebareON[id] = 0;
    NText[id][0] = EOS;
    return 1;
}

Daca gasesti buguri sau ceva ma anunti, spor! :D

Edited by NERS
Posted (edited)

Merge bn

 

Edited by IosifR

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • 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.