mandat Posted September 15, 2021 Posted September 15, 2021 Salut, am o problema. YCMD:set(playerid, params[], help) { if(playerData[playerid][playerAdmin] < 3) return SCM(playerid, COLOR_LIGHTGREEN3, "You are not allowed to use this command."); new user, option[32], value; if(sscanf(params, "us[32]d", user, option, value)) { SCM(playerid, COLOR_GREY, "Usage: {ffffff}/set <name/playerid> <option> <value>"); SCM(playerid, COLOR_WHITE, "Options: heal, armour"); return 1; } switch(YHash(option, false)) { case _H<health>: { SetPlayerHealth(user, value); } case _H<armour>: { SetPlayerArmour(user, value); } } return 1; } => comanda nu rezulta nimic, am facut test cu strcmp imi seteaza heal si armour, dar cu YHash nu rezulta nimic.. am schimbate de multe ori multe include YHash nimic, nu stiu ce e gresit, am mai lucrat cu acest include si a functionat perfect, acum ce l-a apucat?
Banditul Posted September 16, 2021 Posted September 16, 2021 Problema este faptul ca ii spui sa ignore daca string este scris cu litere mari sau mici dar folosesti declaratia normala _H in loc de _I https://github.com/pawn-lang/YSI-Includes/blob/5.x/YSI_Coding/y_stringhash/features.md switch(YHash(option, false)) { case _I<health>: { SetPlayerHealth(user, value); } case _I<armour>: { SetPlayerArmour(user, value); }
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now