Jump to content

Ajutor comanda


Popescu413

Recommended Posts

Am si eu comanda

CMD:setkey(playerid, params[]) {
    if(PlayerInfo[playerid][pAdmin] < 6) return 1;
    new key[64], svpass[32], string[256], id;
    if(sscanf(params, "is[64]s[32]", id, key, svpass)) return SCM(playerid, COLOR_GREY, "USAGE: {FFFFFF}/setkey <playerid/name> <key> <server password>");
    if(!IsPlayerConnected(id) || id == INVALID_PLAYER_ID) return SendClientMessage(playerid, COLOR_GREY, "Acel player nu este conectat.");
    if(PlayerInfo[id][pAdmin] == 0) return SCM(playerid, COLOR_GREY, "Acel player nu este admin!");
    if(strcmp(svpass, SERVER_PASSWORD, true) == 0) {}
    else return SCM(playerid, COLOR_WARNING, "Invalid server password!");
    if(strlen(key) < 6 || strlen(key) > 32) return SCM(playerid, COLOR_GREY, "Parola trebuie sa contina minim 6 caractere sau maxim 32!");
    
    new query[256];
    mysql_format(SQL, query, sizeof(query), "UPDATE `users` SET `Security`='%s' WHERE `ID`='%d'", MD5_Hash(key), PlayerInfo[playerid][pSQLID]);
    mysql_tquery(SQL, query, "", "");
    format(PlayerInfo[id][pSecurity], 64, MD5_Hash(key));
    
    format(string, sizeof(string), "New security password for %s: %s", GetName(id), key);
    ShowPlayerDialog(playerid, 0, DIALOG_STYLE_MSGBOX, "Security password", string, "Close", "");
    return 1;
}

 

si as dori sa mai fac unde gen /setkeyme parola parolaserver , pentru playerul care da comanda in chat ..., sa nu poate seta si la alt player. Ma puteti ajuta va rog frumos ?? (e pe GM burned)

 

In caz de nu am facut bine topic il voi modifica 

Edited by Popescu413
Link to comment
Share on other sites

  • 1 year later...
La 13.11.2017 la 8:05, Popescu413 a spus:

Am si eu comanda

 


CMD:setkey(playerid, params[]) {
    if(PlayerInfo[playerid][pAdmin] < 6) return 1;
    new key[64], svpass[32], string[256], id;
    if(sscanf(params, "is[64]s[32]", id, key, svpass)) return SCM(playerid, COLOR_GREY, "USAGE: {FFFFFF}/setkey <playerid/name> <key> <server password>");
    if(!IsPlayerConnected(id) || id == INVALID_PLAYER_ID) return SendClientMessage(playerid, COLOR_GREY, "Acel player nu este conectat.");
    if(PlayerInfo[id][pAdmin] == 0) return SCM(playerid, COLOR_GREY, "Acel player nu este admin!");
    if(strcmp(svpass, SERVER_PASSWORD, true) == 0) {}
    else return SCM(playerid, COLOR_WARNING, "Invalid server password!");
    if(strlen(key) < 6 || strlen(key) > 32) return SCM(playerid, COLOR_GREY, "Parola trebuie sa contina minim 6 caractere sau maxim 32!");
    
    new query[256];
    mysql_format(SQL, query, sizeof(query), "UPDATE `users` SET `Security`='%s' WHERE `ID`='%d'", MD5_Hash(key), PlayerInfo[playerid][pSQLID]);
    mysql_tquery(SQL, query, "", "");
    format(PlayerInfo[id][pSecurity], 64, MD5_Hash(key));
    
    format(string, sizeof(string), "New security password for %s: %s", GetName(id), key);
    ShowPlayerDialog(playerid, 0, DIALOG_STYLE_MSGBOX, "Security password", string, "Close", "");
    return 1;
}

 

 

si as dori sa mai fac unde gen /setkeyme parola parolaserver , pentru playerul care da comanda in chat ..., sa nu poate seta si la alt player. Ma puteti ajuta va rog frumos ?? (e pe GM burned)

 

In caz de nu am facut bine topic il voi modifica 

pai ia de pe gm burned e bun daca ai nevoie . dar e /setkey dar il modifici tu bagi si me .:) 

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
Reply to this topic...

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