10.04.2017, 07:47
the problem is here
and can you explain me what is this ? kicking a player who wanted to ban a banned player ?
and also this code wont ban him ! you have to save dini info of players beeing banned after banning him sending a client message wont make that player BANNED !
so you need something like this :
and also you are not saving or using reason so why should you do that ?
you can do like this :
PHP код:
if(sscanf(params, "s[32]s[128]", playerb, params))
/* see that params ? u already defining it you have to make new string for reason
like :
new reason[64];
if(sscanf(params, "s[32]s[128]", playerb, reason)) return SendClientMessage(playerid, COLOR_RED, "USAGE: /offlineban [playername] [reason]");
PHP код:
if(!strcmp(dini_Get(file,"banned"),true)) {
Kick(playerid);
}
so you need something like this :
PHP код:
dini_IntSet(file, "banned", true);
you can do like this :
PHP код:
format(string, sizeof(string), "AdmCmd: %s is been banned for %s", playerb,reason);