Posts: 1,219
Threads: 51
Joined: Jul 2012
use specifier "i" or "d" instead of "u", because "u" is for playernames/ids of players that are online
Edit:
I am assuming that your "Account(id)" function works properly.
Posts: 206
Threads: 64
Joined: Jun 2012
Reputation:
0
I go try now, will reply.
Posts: 928
Threads: 13
Joined: Feb 2016
Reputation:
0
It's offline ban, Which means the player is not online. How can you ban him with his ID? lol
You should ban with his name, not ID.
Posts: 1,219
Threads: 51
Joined: Jul 2012
Quote:
Originally Posted by oMa37
It's offline ban, Which means the player is not online. How can you ban him with his ID? lol
You should ban with his name, not ID.
|
His Account function is probably retrieving the players file through a unique id, at least thats what i thought, which is probably totally wrong
Otherwise,i couldn't think of a reason why he even called his parameter "id"
Posts: 206
Threads: 64
Joined: Jun 2012
Reputation:
0
dude really? it's just new id; it doesnt specify the id of a player, you could enter anything.
Posts: 1,219
Threads: 51
Joined: Jul 2012
u didn't even get what i mean
i was talking about your naming, you called it id , so i thought you have some kind of unique id in your player files.
Posts: 599
Threads: 48
Joined: May 2016
PHP код:
CMD:ofban(playerid, params[])
{
if(isnull(params)) return SendClientMessage(playerid, COLOR_RED, "USAGE:{FFFFFF}/oban [ACCOUNT NAME]");
new
account[40] = "users/";
strcat(account, params);
strins(account, ".ini");
if(!dini_Exists(account)) return SendClientMessage(playerid, -1, "That player does not exist!");
dini_IntSet(account, "banned", 1);
new
string[64];
format(string, sizeof(string), ""COL_LIME"Account %s has been banned", params);
SendClientMessageToAll(COLOR_YELLOW,string);
return 1;
}