12.10.2017, 12:34
(
Последний раз редактировалось Prokill911; 12.10.2017 в 13:37.
)
Hey, So I've recently come back to samp after 2 n half years and I fucking hate DINI like with a passion, If this was SQL It'd be piece of cake..
But for some reason, this command DOES not work and I can't figure out why not.
Now, If I unban lets say "Prokill" it will work it lets me unban that account, but now if I change that name too; Prokill_ Or Prokill_123
The second I add that underscore It all goes too shit..
Anyone have any ideas?
Edit:
Found out that when a user registers for example: Test_Test, It saves it as "Test_00Test" same with [Test] "00Test00".. can't find why or where it's doing this
But for some reason, this command DOES not work and I can't figure out why not.
PHP код:
CMD:unban(playerid, params[]) {
if(PlayerInfo[playerid][Level] >= 2 || IsPlayerAdmin(playerid)) {
new name[(MAX_PLAYER_NAME*2)+1];
if(!sscanf(params, "s[128]", name)) {
new name2[128];
format(name2, sizeof(name2), "%s", name);
if(udb_Exists(name2) && PlayerInfo[playerid][LoggedIn] == 1) {
new file[128];
format(file,sizeof(file),"/ladmin/users/%s.sav",udb_encode(name2) );
new isbanned = dini_Int(file, "banned");
if(isbanned == 1) {
dUserSetINT(name2).("banned",0);
new msg[128];
format(msg, sizeof(msg), "%s has been unbanned", name2);
SendClientMessage(playerid, -1, msg);
} else {
SendClientMessage(playerid, -1, "This player is not banned!");
}
} else {
SendClientMessage(playerid, -1, "Player not found, no ban removed!"); //Always exits too this line
return 1;
}
} else {
SendClientMessage(playerid, -1, "USAGE: /unban [accountname]");
}
}
return 1;
}
The second I add that underscore It all goes too shit..
Anyone have any ideas?
Edit:
Found out that when a user registers for example: Test_Test, It saves it as "Test_00Test" same with [Test] "00Test00".. can't find why or where it's doing this