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, "iis", 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 = floatround(float(ore)/24.0); SetTimer("ban1",zi,1); SetTimer("kicktimer",2500,1); GetPlayerName(playerid, name, 60); GetPlayerName(playerid, name2, 60); 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); 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); FixedBan(ID); } } return 1; }
Stop double posting and creating so many threads related to the same issue, this way you might get banished! There's no need to write in red, you're going to hurt our eyes. Thread's title should contain information related to the issue, not non-sense words. Read the rules before posting, please.
Back to the topic, check the tutorials thread, there are many dini tutorials. There are also a lot of released scripts which do what you're looking for. |