/*
___________ __ .___ __________
\\__ ___/___ ___ ____/ |_ __| _/___________ __ _ __ \\______ \\_____ ____
| |_/ __ \\\\ \\/ /\\ __\\/ __ |\\_ __ \\__ \\\\ \\/ \\/ / | | _/\\__ \\ / \\
| |\\ ___/ > < | | / /_/ | | | \\// __ \\\\ / | | \\ / __ \\| | \\
|____| \\___ >__/\\_ \\ |__| \\____ | |__| (____ /\\/\\_/ |______ /(____ /___| /
\\/ \\/ \\/ \\/ \\/ \\/ \\/
*/
//fordította: danix99
#include <a_samp>
#include <sscanf2>
//DCMD:
//---Command processor---//
#define dcmd(%1,%2,%3) if ((strcmp((%3)[1], #%1, true, (%2)) == 0) && ((((%3)[(%2) + 1] == 0) && (dcmd_%1(playerid, \"\")))||(((%3)[(%2) + 1] == 32) && (dcmd_%1(playerid, (%3)[(%2) + 2]))))) return 1 // The dcmd define
//Színek:
//---Colors---//
#define COLOR_WHITE 0xFFFFFFAA
#define COL_GREEN \"{6EF83C}\"
#define COL_RED \"{F81414}\"
//Változók
//---Variables---//
new Text:Box[MAX_PLAYERS];
new Text:BannedNotice[MAX_PLAYERS];
new Text:Info[MAX_PLAYERS];
new Text:Site[MAX_PLAYERS];
//Parancsok
//---Commands---//
dcmd_ban(playerid, params[]) {
new pName[MAX_PLAYER_NAME] , pName2[MAX_PLAYER_NAME] , targetid , reason[64] , string[128] , stringbig[256] , YEAR_string[5], Year, Month, Day;
GetPlayerName(targetid, pName, sizeof(pName));\\
GetPlayerName(playerid, pName2, sizeof(pName2));
getdate(Year, Month, Day);
if(!IsPlayerAdmin(playerid)) return 0;
if(sscanf(params, \"us[80]\", targetid ,reason)) return SendClientMessage(playerid, COLOR_WHITE, \"Szerver: \"COL_GREEN\"/ban [playerid/név] [indok]\");
if(!IsPlayerConnected(targetid)) return SendClientMessage(playerid, COLOR_WHITE, \"Szerver: \"COL_RED\" A játékos nincs csatlakozva!\");
format(string, sizeof(string), \"SERVER: \"COL_RED\"%s \"COL_GREEN\"bannolva lett! \"COL_RED\"(Reason: %s)\",pName, reason);
SendClientMessageToAll(COLOR_WHITE, string);
format(YEAR_string, sizeof(YEAR_string), \"%d\", Year);
strdel(YEAR_string, 0, 2);
format(stringbig, sizeof(stringbig),\"~r~ Indok: ~w~ %s ~n~~r~Bannolt: ~w~ %s ~n~~r~Datum: ~w~ %d.%d%d\",reason,pName2,YEAR_string, Month, Date);
TextDrawSetString(Info[playerid] , stringbig);
TextDrawShowForPlayer(playerid, Info[playerid]);
TextDrawShowForPlayer(playerid, Box[playerid]);
TextDrawShowForPlayer(playerid, BannedNotice[playerid]);
TextDrawShowForPlayer(playerid, Site[playerid]);
Ban(targetid);
return 1;
}
public OnPlayerCommandText(playerid, cmdtext[]) {
dcmd(ban, 3, cmdtext);
return 0;
}
public OnFilterScriptInit() {
for(new playerid; playerid < MAX_PLAYERS; playerid ++) {
Box[playerid] = TextDrawCreate(2.000000, 0.000000, \"~n~\");
TextDrawBackgroundColor(Box[playerid], 255);
TextDrawFont(Box[playerid], 1);
TextDrawLetterSize(Box[playerid], 0.500000, 49.700004);
TextDrawColor(Box[playerid], -1);
TextDrawSetOutline(Box[playerid], 0);
TextDrawSetProportional(Box[playerid], 1);
TextDrawSetShadow(Box[playerid], 1);
TextDrawUseBox(Box[playerid], 1);
TextDrawBoxColor(Box[playerid], 255);
TextDrawTextSize(Box[playerid], 637.000000, 20.000000);
BannedNotice[playerid] = TextDrawCreate(120.000000, 129.000000, \"~r~Bannolva lettel a szerverrol!\");
TextDrawBackgroundColor(BannedNotice[playerid], 255);
TextDrawFont(BannedNotice[playerid], 1);
TextDrawLetterSize(BannedNotice[playerid], 0.600000, 5.000000);
TextDrawColor(BannedNotice[playerid], -1);
TextDrawSetOutline(BannedNotice[playerid], 0);
TextDrawSetProportional(BannedNotice[playerid], 1);
TextDrawSetShadow(BannedNotice[playerid], 1);
Info[playerid] = TextDrawCreate(182.000000, 207.000000, \"~r~Indok: ~w~ ~n~~r~Bannolt: ~w~ ~n~~r~Datum: ~w~ \");
TextDrawBackgroundColor(Info[playerid], 255);
TextDrawFont(Info[playerid], 1);
TextDrawLetterSize(Info[playerid], 0.500000, 1.800000);
TextDrawColor(Info[playerid], -1);
TextDrawSetOutline(Info[playerid], 0);
TextDrawSetProportional(Info[playerid], 1);
TextDrawSetShadow(Info[playerid], 1);
TextDrawUseBox(Info[playerid], 1);
TextDrawBoxColor(Info[playerid], 1681016400);
TextDrawTextSize(Info[playerid], 410.000000, -30.000000);
Site[playerid] = TextDrawCreate(20.000000, 420.000000, \"Fenykepezd ezt le az ~g~ F8 ~w~ megnyomasaval, es toltsd fel a kepet egy hostra! (kepfeltoltes.hu)\");
TextDrawBackgroundColor(Site[playerid], 255);
TextDrawFont(Site[playerid], 1);
TextDrawLetterSize(Site[playerid], 0.400000, 1.000000);
TextDrawColor(Site[playerid], -1);
TextDrawSetOutline(Site[playerid], 0);
TextDrawSetProportional(Site[playerid], 1);
TextDrawSetShadow(Site[playerid], 1);
}
return 1;
}
Kép <--==:( Ez még angol ):==-->
LetöltésPastebin -> forráskód (magyar)