Jump to content
  • 0

Niste probleme


TaviZzZ

Question

CMD:setorder(playerid, params[]) {
    if(IsPlayerLogged[playerid] == 0) return SendClientMessage(playerid, COLOR_LIGHTRED, "Trebuie sa te loghezi mai intai.");
    if(!IsAMember(playerid)) return SCM(playerid, COLOR_LIGHTRED, "Nu esti un mafiot!");
       if(GetPlayerInterior(playerid) == 0) return SendClientMessage(playerid, COLOR_WHITE,"Nu esti in HQ.");
       new gunname[128];
    if(sscanf(params, "i[10]", gunname)) {
        SendClientMessage(playerid, COLOR_GREY, "Syntax:{FFFFFF} /setorder Arma");
        SendClientMessage(playerid, COLOR_WHITE, "Available names: Deagle(1), M4(2).");
        return 1;
    }
    if(strcmp(gunname,"1",true) == 0) {
        ShowPlayerDialog(playerid, DIALOG_DEAGLE,DIALOG_STYLE_INPUT, "Arma deagle","Scrie numarul de glooante(Nrx40gloante)","Ok","Close");
    }
    else if(strcmp(gunname,"2",true) == 0) {
        SCM(playerid, -1, "Nush de ce am pus asta >)");
    }
    return 1;
}

Cand scriu comanda si un nr nu face nimic, am gresit ceva cred.

 

Link to comment
Share on other sites

3 answers to this question

Recommended Posts

  • 0

incearca sa faci ceva de genu

new gunname;
 	if(sscanf(params, "i", gunname)) {
        SendClientMessage(playerid, COLOR_GREY, "Syntax:{FFFFFF} /setorder Arma");
        SendClientMessage(playerid, COLOR_WHITE, "Available names: Deagle(1), M4(2).");
        return 1;
    }
    if(gunname == 1) ShowPlayerDialog(playerid, DIALOG_DEAGLE,DIALOG_STYLE_INPUT, "Arma deagle","Scrie numarul de glooante(Nrx40gloante)","Ok","Close");
    else etc..
  ..

 

Citat
Link to comment
Share on other sites

  • 0

Incearca:

 

CMD:setorder(playerid, params[]) {
    new gunname[128];
    if(IsPlayerLogged[playerid] == 0) return SendClientMessage(playerid, COLOR_LIGHTRED, "Trebuie sa te loghezi mai intai.");
    if(!IsAMember(playerid)) return SCM(playerid, COLOR_LIGHTRED, "Nu esti un mafiot!");
    if(GetPlayerInterior(playerid) == 0) return SendClientMessage(playerid, COLOR_WHITE,"Nu esti in HQ.");
    
    if(sscanf(params, "i", gunname)) {
        SendClientMessage(playerid, COLOR_GREY, "Syntax:{FFFFFF} /setorder Arma");
        SendClientMessage(playerid, COLOR_WHITE, "Available names: Deagle(1), M4(2).");
        return 1;
    }
    switch(gunname) {
        case 1: ShowPlayerDialog(playerid, DIALOG_DEAGLE,DIALOG_STYLE_INPUT, "Arma deagle","Scrie numarul de glooante(Nrx40gloante)","Ok","Close");
        case 2: SendClientMessage(playerid, -1, "nU STIU DE CE AM PUS ASTA AICI (SPER CA MERE !)")
    }
    return 1;
}

Link to comment
Share on other sites

  • 0

CMD:setorder(playerid, params[]) {
    new list;
    if(IsPlayerLogged[playerid] == 0) return SendClientMessage(playerid, COLOR_LIGHTRED, "Trebuie sa te loghezi mai intai.");
    if(!IsAMember(playerid)) return SCM(playerid, COLOR_LIGHTRED, "Nu esti un mafiot!");
    if(GetPlayerInterior(playerid) == 0) return SendClientMessage(playerid, COLOR_WHITE,"Nu esti in HQ.");
    if(sscanf(params, "i", list)) {
        SCM(playerid, COLOR_RED, "Usage: {FFFFFF}/setorder <Gun>");
        SCM(playerid, COLOR_WHITE, "Type: Deagle(1), M4(2).");
    }
    switch(list) {
        case 1: ShowPlayerDialog(playerid, DIALOG_DEAGLE,DIALOG_STYLE_INPUT, "Arma deagle","Scrie numarul de glooante(Nrx40gloante)","Ok","Close");
        case 2: SendClientMessage(playerid, COLOR_WHITE, "Test.");
    }
    return 1;
}

Incearca asa, lasa un reply daca ai rezolvat problema raportata.

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.