Jump to content

Recommended Posts

Posted (edited)

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
  • 1 year later...
Posted
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 .:) 

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