30.08.2014, 02:04
I never added an animation system
here's the full code
here's the full code
Код:
#define FILTERSCRIPT #include <a_samp> #include "Tommeh/TommehAdmin.inc" #pragma unused strtok #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 #define GetStringArg(%1,%2) for(new x = 0; getarg(%1,x) != '\0'; x++) %2[x] = getarg(%1,x) #define yellow 0xFFFF00AA #define green 0x33FF33AA #define red 0xFF0000AA #define white 0xFFFFFFAA #define pink 0xCCFF00FFAA #define blue 0x00FFFFAA #define grey 0xC0C0C0AA #define COLOR_LIGHTBLUE 0x33CCFFAA #define COLOR_RED 0xAA3333AA #define COLOR_GREY 0xAFAFAFAA #define COLOR_YELLOW 0xFFFF00AA #define COLOR_PINK 0xFF66FFAA #define COLOR_BLUE 0x0000BBAA #define COLOR_WHITE 0xFFFFFFAA #define COLOR_DARKRED 0x660000AA #define COLOR_ORANGE 0xFF9900AA #define COLOR_BRIGHTRED 0xFF0000AA #define COLOR_INDIGO 0x4B00B0AA #define COLOR_VIOLET 0x9955DEEE #define COLOR_LIGHTRED 0xFF99AADD #define COLOR_SEAGREEN 0x00EEADDF #define COLOR_GRAYWHITE 0xEEEEFFC4 #define COLOR_LIGHTNEUTRALBLUE 0xabcdef66 #define COLOR_GREENISHGOLD 0xCCFFDD56 #define COLOR_LIGHTBLUEGREEN 0x0FFDD349 #define COLOR_NEUTRALBLUE 0xABCDEF01 #define COLOR_LIGHTCYAN 0xAAFFCC33 #define COLOR_LEMON 0xDDDD2357 #define COLOR_MEDIUMBLUE 0x63AFF00A #define COLOR_NEUTRAL 0xABCDEF97 #define COLOR_BLACK 0x00000000 #define COLOR_NEUTRALGREEN 0x81CFAB00 #define COLOR_DARKGREEN 0x12900BBF #define COLOR_LIGHTGREEN 0x24FF0AB9 #define COLOR_DARKBLUE 0x300FFAAB #define COLOR_BLUEGREEN 0x46BBAA00 #define COLOR_PINK 0xFF66FFAA #define COLOR_LIGHTBLUE 0x33CCFFAA #define COLOR_DARKRED 0x660000AA #define COLOR_ORANGE 0xFF9900AA #define COLOR_PURPLE 0x800080AA #define COLOR_GRAD1 0xB4B5B7FF #define COLOR_GRAD2 0xBFC0C2FF #define COLOR_RED1 0xFF0000AA #define COLOR_GREY 0xAFAFAFAA #define COLOR_GREEN 0x33AA33AA #define COLOR_RED 0xAA3333AA #define COLOR_YELLOW 0xFFFF00AA #define COLOR_WHITE 0xFFFFFFAA #define COLOR_BROWN 0x993300AA #define COLOR_CYAN 0x99FFFFAA #define COLOR_TAN 0xFFFFCCAA #define COLOR_PINK 0xFF66FFAA #define COLOR_KHAKI 0x999900AA #define COLOR_LIME 0x99FF00AA #define COLOR_SYSTEM 0xEFEFF7AA #define COLOR_GRAD2 0xBFC0C2FF #define COLOR_GRAD4 0xD8D8D8FF #define COLOR_GRAD6 0xF0F0F0FF #define COLOR_GRAD2 0xBFC0C2FF #define COLOR_GRAD3 0xCBCCCEFF #define COLOR_GRAD5 0xE3E3E3FF #define COLOR_GRAD1 0xB4B5B7FF new Text:Textdraw0; new Text:Textdraw1; new Text:Textdraw2; new Text:Textdraw3; new Text:Textdraw4; //Owner new Text:Textdraw5; //Admin new Text:Textdraw6; //Moderator new Text:Textdraw7; //Authorative new Text:Textdraw8; //Intern new Text:Textdraw9; //Member new Text:Textdraw10; //Guest new Text:Textdraw11; new Text:Textdraw12; new Text:Textdraw13; //staff textdraw/colors #if defined FILTERSCRIPT public OnFilterScriptInit() { print("\n--------------------------------------"); print(" -----------Freeroam Textdraw-----------"); print("------------Beta Version 0.1-----------------\n"); return 1; } public OnFilterScriptExit() { return 1; } #else #endif public OnPlayerConnect(playerid) { new statuslevel; new file[128], pname[MAX_PLAYER_NAME]; GetPlayerName(playerid, pname, sizeof(pname)); format(file, sizeof(file), "/Tommeh/Users/%s.ini", pname); statuslevel = dini_Int(file, "statuslevel"); Textdraw0 = TextDrawCreate(473.599945, 327.786468, "Tommeh Freeroam"); TextDrawLetterSize(Textdraw0, 0.449999, 1.600000); TextDrawAlignment(Textdraw0, 1); TextDrawColor(Textdraw0, -1); TextDrawSetShadow(Textdraw0, 0); TextDrawSetOutline(Textdraw0, 1); TextDrawBackgroundColor(Textdraw0, 51); TextDrawFont(Textdraw0, 1); TextDrawSetProportional(Textdraw0, 1); Textdraw1 = TextDrawCreate(631.599975, 326.300018, "usebox"); TextDrawLetterSize(Textdraw1, 0.000000, 8.975182); TextDrawTextSize(Textdraw1, 464.399993, 0.000000); TextDrawAlignment(Textdraw1, 1); TextDrawColor(Textdraw1, 0); TextDrawUseBox(Textdraw1, true); TextDrawBoxColor(Textdraw1, 102); TextDrawSetShadow(Textdraw1, 0); TextDrawSetOutline(Textdraw1, 0); TextDrawFont(Textdraw1, 0); Textdraw2 = TextDrawCreate(474.399993, 345.706665, "Beta v0.1"); TextDrawLetterSize(Textdraw2, 0.449999, 1.600000); TextDrawAlignment(Textdraw2, 1); TextDrawColor(Textdraw2, -1); TextDrawSetShadow(Textdraw2, 0); TextDrawSetOutline(Textdraw2, 1); TextDrawBackgroundColor(Textdraw2, 51); TextDrawFont(Textdraw2, 1); TextDrawSetProportional(Textdraw2, 1); Textdraw3 = TextDrawCreate(473.600006, 363.626678, "Status:"); TextDrawLetterSize(Textdraw3, 0.449999, 1.600000); TextDrawAlignment(Textdraw3, 1); TextDrawColor(Textdraw3, -1); TextDrawSetShadow(Textdraw3, 0); TextDrawSetOutline(Textdraw3, 1); TextDrawBackgroundColor(Textdraw3, 51); TextDrawFont(Textdraw3, 1); TextDrawSetProportional(Textdraw3, 1); Textdraw11 = TextDrawCreate(472.000091, 378.559936, "/cmds"); TextDrawLetterSize(Textdraw11, 0.406800, 1.547733); TextDrawAlignment(Textdraw11, 1); TextDrawColor(Textdraw11, 16711935); TextDrawSetShadow(Textdraw11, 0); TextDrawSetOutline(Textdraw11, 1); TextDrawBackgroundColor(Textdraw11, 51); TextDrawFont(Textdraw11, 1); TextDrawSetProportional(Textdraw11, 1); Textdraw12 = TextDrawCreate(516.799987, 378.559875, "/help"); TextDrawLetterSize(Textdraw12, 0.433999, 1.592533); TextDrawAlignment(Textdraw12, 1); TextDrawColor(Textdraw12, -65281); TextDrawSetShadow(Textdraw12, 0); TextDrawSetOutline(Textdraw12, 1); TextDrawBackgroundColor(Textdraw12, 51); TextDrawFont(Textdraw12, 1); TextDrawSetProportional(Textdraw12, 1); Textdraw13 = TextDrawCreate(559.999816, 379.306579, "/rules"); TextDrawLetterSize(Textdraw13, 0.449199, 1.510399); TextDrawAlignment(Textdraw13, 1); TextDrawColor(Textdraw13, -16776961); TextDrawSetShadow(Textdraw13, 0); TextDrawSetOutline(Textdraw13, 1); TextDrawBackgroundColor(Textdraw13, 51); TextDrawFont(Textdraw13, 1); TextDrawSetProportional(Textdraw13, 1); ////////////////////////////////////////////////// ////////////////////////////////////////////////// if (statuslevel == 6) { Textdraw4 = TextDrawCreate(530.399963, 364.373260, "OWNER"); TextDrawLetterSize(Textdraw4, 0.363599, 1.585066); TextDrawTextSize(Textdraw4, -107.199974, -152.320053); TextDrawAlignment(Textdraw4, 1); TextDrawColor(Textdraw4, COLOR_RED); TextDrawSetShadow(Textdraw4, 0); TextDrawSetOutline(Textdraw4, 1); TextDrawBackgroundColor(Textdraw4, 51); TextDrawFont(Textdraw4, 3); TextDrawSetProportional(Textdraw4, 1); } if (statuslevel == 5) { Textdraw5 = TextDrawCreate(530.399963, 364.373260, "ADMINISTRATOR"); TextDrawLetterSize(Textdraw5, 0.363599, 1.585066); TextDrawTextSize(Textdraw5, -107.199974, -152.320053); TextDrawAlignment(Textdraw5, 1); TextDrawColor(Textdraw5, COLOR_ORANGE); TextDrawSetShadow(Textdraw5, 0); TextDrawSetOutline(Textdraw5, 1); TextDrawBackgroundColor(Textdraw5, 51); TextDrawFont(Textdraw5, 3); TextDrawSetProportional(Textdraw5, 1); } if (statuslevel == 4) { Textdraw6 = TextDrawCreate(530.399963, 364.373260, "MODERATOR"); TextDrawLetterSize(Textdraw6, 0.363599, 1.585066); TextDrawTextSize(Textdraw6, -107.199974, -152.320053); TextDrawAlignment(Textdraw6, 1); TextDrawColor(Textdraw6, COLOR_YELLOW); TextDrawSetShadow(Textdraw6, 0); TextDrawSetOutline(Textdraw6, 1); TextDrawBackgroundColor(Textdraw6, 51); TextDrawFont(Textdraw6, 3); TextDrawSetProportional(Textdraw6, 1); } if (statuslevel == 3) { Textdraw7 = TextDrawCreate(530.399963, 364.373260, "AUTHORATIVE"); TextDrawLetterSize(Textdraw7, 0.363599, 1.585066); TextDrawTextSize(Textdraw7, -107.199974, -152.320053); TextDrawAlignment(Textdraw7, 1); TextDrawColor(Textdraw7, COLOR_LIGHTBLUE); TextDrawSetShadow(Textdraw7, 0); TextDrawSetOutline(Textdraw7, 1); TextDrawBackgroundColor(Textdraw7, 51); TextDrawFont(Textdraw7, 3); TextDrawSetProportional(Textdraw7, 1); } if (statuslevel == 2) { Textdraw8 = TextDrawCreate(530.399963, 364.373260, "INTERN"); TextDrawLetterSize(Textdraw8, 0.363599, 1.585066); TextDrawTextSize(Textdraw8, -107.199974, -152.320053); TextDrawAlignment(Textdraw8, 1); TextDrawColor(Textdraw8, COLOR_GREEN); TextDrawSetShadow(Textdraw8, 0); TextDrawSetOutline(Textdraw8, 1); TextDrawBackgroundColor(Textdraw8, 51); TextDrawFont(Textdraw8, 3); TextDrawSetProportional(Textdraw8, 1); } if (statuslevel == 1) { Textdraw9 = TextDrawCreate(530.399963, 364.373260, "MEMBER"); TextDrawLetterSize(Textdraw9, 0.363599, 1.585066); TextDrawTextSize(Textdraw9, -107.199974, -152.320053); TextDrawAlignment(Textdraw9, 1); TextDrawColor(Textdraw9, COLOR_BLUE); TextDrawSetShadow(Textdraw9, 0); TextDrawSetOutline(Textdraw9, 1); TextDrawBackgroundColor(Textdraw9, 51); TextDrawFont(Textdraw9, 3); TextDrawSetProportional(Textdraw9, 1); } if (!statuslevel) { Textdraw10 = TextDrawCreate(530.399963, 364.373260, "GUEST"); TextDrawLetterSize(Textdraw10, 0.363599, 1.585066); TextDrawTextSize(Textdraw10, -107.199974, -152.320053); TextDrawAlignment(Textdraw10, 1); TextDrawColor(Textdraw10, COLOR_WHITE); TextDrawSetShadow(Textdraw10, 0); TextDrawSetOutline(Textdraw10, 1); TextDrawBackgroundColor(Textdraw10, 51); TextDrawFont(Textdraw10, 3); TextDrawSetProportional(Textdraw10, 1); } return 1; } public OnPlayerDisconnect(playerid, reason) { TextDrawDestroy(Textdraw0); TextDrawDestroy(Textdraw1); TextDrawDestroy(Textdraw2); TextDrawDestroy(Textdraw3); TextDrawDestroy(Textdraw4); TextDrawDestroy(Textdraw5); TextDrawDestroy(Textdraw6); TextDrawDestroy(Textdraw7); TextDrawDestroy(Textdraw8); TextDrawDestroy(Textdraw9); TextDrawDestroy(Textdraw10); TextDrawDestroy(Textdraw11); TextDrawDestroy(Textdraw12); TextDrawDestroy(Textdraw13); /*TextDrawHideForPlayer(playerid, Textdraw0); TextDrawHideForPlayer(playerid, Textdraw1); TextDrawHideForPlayer(playerid, Textdraw2); TextDrawHideForPlayer(playerid, Textdraw3); TextDrawHideForPlayer(playerid, Textdraw4); TextDrawHideForPlayer(playerid, Textdraw5); TextDrawHideForPlayer(playerid, Textdraw6); TextDrawHideForPlayer(playerid, Textdraw7); TextDrawHideForPlayer(playerid, Textdraw8); TextDrawHideForPlayer(playerid, Textdraw9); TextDrawHideForPlayer(playerid, Textdraw10);*/ return 1; } public OnPlayerSpawn(playerid) { TextDrawShowForPlayer(playerid, Textdraw0); TextDrawShowForPlayer(playerid, Textdraw1); TextDrawShowForPlayer(playerid, Textdraw2); TextDrawShowForPlayer(playerid, Textdraw3); TextDrawShowForPlayer(playerid, Textdraw4); TextDrawShowForPlayer(playerid, Textdraw5); TextDrawShowForPlayer(playerid, Textdraw6); TextDrawHideForPlayer(playerid, Textdraw7); TextDrawShowForPlayer(playerid, Textdraw8); TextDrawShowForPlayer(playerid, Textdraw9); TextDrawShowForPlayer(playerid, Textdraw10); TextDrawShowForPlayer(playerid, Textdraw11); TextDrawShowForPlayer(playerid, Textdraw12); TextDrawShowForPlayer(playerid, Textdraw13); return 1; } public OnPlayerCommandText(playerid,cmdtext[]) { dcmd(tdoff,5,cmdtext); dcmd(tdon,4,cmdtext); return 0; } dcmd_tdoff(playerid, params[]) { /*if(IsPlayerCommandLevel(playerid,"memcmds")) {*/ #pragma unused params TextDrawHideForPlayer(playerid, Textdraw0); TextDrawHideForPlayer(playerid, Textdraw1); TextDrawHideForPlayer(playerid, Textdraw2); TextDrawHideForPlayer(playerid, Textdraw3); TextDrawHideForPlayer(playerid, Textdraw4); TextDrawHideForPlayer(playerid, Textdraw5); TextDrawHideForPlayer(playerid, Textdraw6); TextDrawHideForPlayer(playerid, Textdraw7); TextDrawHideForPlayer(playerid, Textdraw8); TextDrawHideForPlayer(playerid, Textdraw9); TextDrawHideForPlayer(playerid, Textdraw10); TextDrawHideForPlayer(playerid, Textdraw11); TextDrawHideForPlayer(playerid, Textdraw12); TextDrawHideForPlayer(playerid, Textdraw13); /*} else return SendMemErrorMessage(playerid, "memcmds");*/ return 1; } dcmd_tdon(playerid, params[]) { /*if(IsPlayerCommandLevel(playerid,"memcmds")) {*/ #pragma unused params TextDrawShowForPlayer(playerid, Textdraw0); TextDrawShowForPlayer(playerid, Textdraw1); TextDrawShowForPlayer(playerid, Textdraw2); TextDrawShowForPlayer(playerid, Textdraw3); TextDrawShowForPlayer(playerid, Textdraw4); TextDrawShowForPlayer(playerid, Textdraw5); TextDrawShowForPlayer(playerid, Textdraw6); TextDrawHideForPlayer(playerid, Textdraw7); TextDrawShowForPlayer(playerid, Textdraw8); TextDrawShowForPlayer(playerid, Textdraw9); TextDrawShowForPlayer(playerid, Textdraw10); TextDrawShowForPlayer(playerid, Textdraw11); TextDrawShowForPlayer(playerid, Textdraw12); TextDrawShowForPlayer(playerid, Textdraw13); /*} else return SendMemErrorMessage(playerid, "memcmds");*/ return 1; }