Jump to content
  • 0

Ajutor /kickres


La Misto Te Iau Cum Vreau

Question

Am comanda /kick:

 if(strcmp(cmd, "/kick", true) == 0)

 {

  new tmp[128];

  tmp = strtok(cmdtext, idx);

 

  Kick(strval(tmp));

  return 1;

 }

 

Și vreau să o fac în /kickres, să funcționeze gen USAGE: /kickres level

Adică pui un level, și toți playeri care au levelul respectiv sa ia kick, va rog fără mistouri

(Sancky mai bine nu scrie)

Edited by La Misto Te Iau Cum Vreau
Link to comment
Share on other sites

11 answers to this question

Recommended Posts

  • 0
19 hours ago, La Misto Te Iau Cum Vreau said:

Am comanda /kick:

 if(strcmp(cmd, "/kick", true) == 0)

 {

  new tmp[128];

  tmp = strtok(cmdtext, idx);

 

  Kick(strval(tmp));

  return 1;

 }

 

Și vreau să o fac în /kickres, să funcționeze gen USAGE: /kickres level

Adică pui un level, și toți playeri care au levelul respectiv sa ia kick, va rog fără mistouri

(Sancky mai bine nu scrie)

mai bine folosește procesorul aceasta de comenzii: https://github.com/Southclaws/zcmd

Link to comment
Share on other sites

  • 0
 
//ysi commands
 
YCMD:kickres(playerid, params[], help) {
    // verificarea nivelului de admin
    if(pInfo[playerid][pAdmin] < 1) return SendClientMessage(playerid, -1, "Nu ai gradul administrativ necesar.");
    // parametrii pt comanda
    new level;
    if(sscanf(params, "i", level)) return SendClientMessage(playerid, -1, "Syntax: /kickres [level]");
    foreach(new i : Player) {
        if(pInfo[i][pLevel] == level) Kick(i);
    }
    return true;
}
// zcmd
CMD:kickres(playerid, params[], help) {
    // verificarea nivelului de admin
    if(pInfo[playerid][pAdmin] < 1) return SendClientMessage(playerid, -1, "Nu ai gradul administrativ necesar.");
    // parametrii pt comanda
    new level;
    if(sscanf(params, "i", level)) return SendClientMessage(playerid, -1, "Syntax: /kickres [level]");
    // ii da kick
    foreach(new i : Player) {
        if(pInfo[i][pLevel] == level) Kick(i);
    }
    return true;
}
 
Link to comment
Share on other sites

  • 0

iti recomand sa te muti pe ysi, nimeni nu mai foloseste acel procesor de comenzi, in caz ca te muti: 

YCMD:kickres(playerid, params[], help) {
    if(!pInfo[playerid][pAdmin]) return SendClientMessage(playerid, -1, "Nu esti autorizat sa folosesti aceasta comanda!");
    extract params -> new level; else return SendClientMessage(playerid, -1, "Usage: /kickres [level]");
    foreach(new i : Player) if(pInfo[i][pLevel] == level) Kick(i);
    return true;
}
Link to comment
Share on other sites

  • 0
20 minutes ago, mrrares19 said:

iti recomand sa te muti pe ysi, nimeni nu mai foloseste acel procesor de comenzi, in caz ca te muti: 

YCMD:kickres(playerid, params[], help) {
    if(!pInfo[playerid][pAdmin]) return SendClientMessage(playerid, -1, "Nu esti autorizat sa folosesti aceasta comanda!");
    extract params -> new level; else return SendClientMessage(playerid, -1, "Usage: /kickres [level]");
    foreach(new i : Player) if(pInfo[i][pLevel] == level) Kick(i);
    return true;
}

dc fol sintaxa aia pt sscanf urata..

Link to comment
Share on other sites

  • 0
On 10/1/2023 at 4:09 PM, BistyAdry said:

mai bine folosește procesorul aceasta de comenzii: https://github.com/Southclaws/zcmd

sugestia nu este rea insa el deoarece si pentru ca are un gamemode de pe net cu cod antic o sa trebuiasca sa rescrie toate comenzile si sa le treasca pe ysi mai ales de luat in calcul ca este incepator nu cred ca s ar descurca.

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.