28.12.2017, 01:57
I'm have a problem:
I'm maked a /ban command and Banned player not receive message before kick.
Why?
Thanks!
I'm maked a /ban command and Banned player not receive message before kick.
Код:
dcmd_ban(playerid, params[])
{
if(AccountInfo[playerid][aLevel] < 1) SendClientMessage(playerid, COLOR_RED, "Ai nevoie de admin 1 pentru a folosii aceasta comanda!");
else
{
new ore = 60000;
new ID, reason[100], name[60], name2[60], string4[256], string5[256], string6[256], string2[256];
if(sscanf(params, "uis", ID, ore, reason)) SendClientMessage(playerid, COLOR_WHITE, "Scrie: /ban [id/nume] [zile] [motiv]");
else if(IsPlayerConnected(ID) == 0) SendClientMessage(playerid, COLOR_RED, "Player-ul nu este conectat");
else
{
AccountInfo[ID][pBanned] = 1;
new zi = ore*24;
SetTimer("ban1",zi,1);
GetPlayerName(playerid, name, 60);
GetPlayerName(playerid, name2, 60);
format(string4, 256, "Admin %s[%d] ti-a dat ban pentru %s zile. (Motiv: %s)", name, playerid, zi, reason);
SCM(ID, COLOR_YELLOW, string4);
format(string5, 256, "Daca crezi ca ai luat ban degeaba poti face o cerere de unban pe:");
SCM(ID, COLOR_YELLOW, string5);
format(string6, 256, "http://cnrromania.1to.us/index.php?topic=3.0");
SCM(ID, COLOR_YELLOW, string6);
format(string2, 256, "Admin %s[%d] ia dat ban lui %s pentru %s zile. (Motiv: %s)", name, playerid, name2, zi, reason);
SendClientMessageToAll(COLOR_LIGHTRED, string2);
Kick(ID);
}
}
return 1;
}
Thanks!


