16.01.2016, 13:32
I was trying to code but I got these errors
This is my full code
This is the area where I got my errors
Please help.
Код:
C:\Users\4neals\Desktop\Samp\Main\gamemodes\Alpha Omega Roleplay.pwn(745) : error 010: invalid function or declaration C:\Users\4neals\Desktop\Samp\Main\gamemodes\Alpha Omega Roleplay.pwn(747) : error 010: invalid function or declaration C:\Users\4neals\Desktop\Samp\Main\gamemodes\Alpha Omega Roleplay.pwn(761) : error 010: invalid function or declaration C:\Users\4neals\Desktop\Samp\Main\gamemodes\Alpha Omega Roleplay.pwn(764) : error 010: invalid function or declaration C:\Users\4neals\Desktop\Samp\Main\gamemodes\Alpha Omega Roleplay.pwn(766) : error 010: invalid function or declaration C:\Users\4neals\Desktop\Samp\Main\gamemodes\Alpha Omega Roleplay.pwn(768) : error 010: invalid function or declaration Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase 6 Errors.
Код:
//Includes// #include <a_samp> #include <core> #include <float> #include "../include/gl_common.inc" #include "../include/gl_messages.inc" // <- contains all the main text/messaging functions #include <progress> //Includes// //Defines// #define SCM SendClientMessage #define COLOR_ACTIVEBORDER 0xB4B4B4FF #define COLOR_ACTIVECAPTION 0x99B4D1FF #define COLOR_ACTIVECAPTIONTEXT 0x000000FF #define COLOR_APPWORKSPACE 0xABABABFF #define COLOR_CONTROL 0xF0F0F0FF #define COLOR_CONTROLDARK 0xA0A0A0FF #define COLOR_CONTROLDARKDARK 0x696969FF #define COLOR_CONTROLLIGHT 0xE3E3E3FF #define COLOR_CONTROLLIGHTLIGHT 0xFFFFFFFF #define COLOR_CONTROLTEXT 0x000000FF #define COLOR_DESKTOP 0x000000FF #define COLOR_GRAYTEXT 0x808080FF #define COLOR_HIGHLIGHT 0x3399FFFF #define COLOR_HIGHLIGHTTEXT 0xFFFFFFFF #define COLOR_HOTTRACK 0x0066CCFF #define COLOR_INACTIVEBORDER 0xF4F7FCFF #define COLOR_INACTIVECAPTION 0xBFCDDBFF #define COLOR_INACTIVECAPTIONTEXT 0x434E54FF #define COLOR_INFO 0xFFFFE1FF #define COLOR_INFOTEXT 0x000000FF #define COLOR_MENU 0xF0F0F0FF #define COLOR_MENUTEXT 0x000000FF #define COLOR_SCROLLBAR 0xC8C8C8FF #define COLOR_WINDOW 0xFFFFFFFF #define COLOR_WINDOWFRAME 0x646464FF #define COLOR_WINDOWTEXT 0x000000FF #define COLOR_TRANSPARENT 0xFFFFFF00 #define COLOR_ALICEBLUE 0xF0F8FFFF #define COLOR_ANTIQUEWHITE 0xFAEBD7FF #define COLOR_AQUA 0x00FFFFFF #define COLOR_AQUAMARINE 0x7FFFD4FF #define COLOR_AZURE 0xF0FFFFFF #define COLOR_BEIGE 0xF5F5DCFF #define COLOR_BISQUE 0xFFE4C4FF #define COLOR_BLACK 0x000000FF #define COLOR_BLANCHEDALMOND 0xFFEBCDFF #define COLOR_BLUE 0x0000FFFF #define COLOR_BLUEVIOLET 0x8A2BE2FF #define COLOR_BROWN 0xA52A2AFF #define COLOR_BURLYWOOD 0xDEB887FF #define COLOR_CADETBLUE 0x5F9EA0FF #define COLOR_CHARTREUSE 0x7FFF00FF #define COLOR_CHOCOLATE 0xD2691EFF #define COLOR_CORAL 0xFF7F50FF #define COLOR_CORNFLOWERBLUE 0x6495EDFF #define COLOR_CORNSILK 0xFFF8DCFF #define COLOR_CRIMSON 0xDC143CFF #define COLOR_CYAN 0x00FFFFFF #define COLOR_DARKBLUE 0x00008BFF #define COLOR_DARKCYAN 0x008B8BFF #define COLOR_DARKGOLDENROD 0xB8860BFF #define COLOR_DARKGRAY 0xA9A9A9FF #define COLOR_DARKGREEN 0x006400FF #define COLOR_DARKKHAKI 0xBDB76BFF #define COLOR_DARKMAGENTA 0x8B008BFF #define COLOR_DARKOLIVEGREEN 0x556B2FFF #define COLOR_DARKORANGE 0xFF8C00FF #define COLOR_DARKORCHID 0x9932CCFF #define COLOR_DARKRED 0x8B0000FF #define COLOR_DARKSALMON 0xE9967AFF #define COLOR_DARKSEAGREEN 0x8FBC8BFF #define COLOR_DARKSLATEBLUE 0x483D8BFF #define COLOR_DARKSLATEGRAY 0x2F4F4FFF #define COLOR_DARKTURQUOISE 0x00CED1FF #define COLOR_DARKVIOLET 0x9400D3FF #define COLOR_DEEPPINK 0xFF1493FF #define COLOR_DEEPSKYBLUE 0x00BFFFFF #define COLOR_DIMGRAY 0x696969FF #define COLOR_DODGERBLUE 0x1E90FFFF #define COLOR_FIREBRICK 0xB22222FF #define COLOR_FLORALWHITE 0xFFFAF0FF #define COLOR_FORESTGREEN 0x228B22FF #define COLOR_FUCHSIA 0xFF00FFFF #define COLOR_GAINSBORO 0xDCDCDCFF #define COLOR_GHOSTWHITE 0xF8F8FFFF #define COLOR_GOLD 0xFFD700FF #define COLOR_GOLDENROD 0xDAA520FF #define COLOR_GRAY 0x808080FF #define COLOR_GREEN 0x008000FF #define COLOR_GREENYELLOW 0xADFF2FFF #define COLOR_HONEYDEW 0xF0FFF0FF #define COLOR_HOTPINK 0xFF69B4FF #define COLOR_INDIANRED 0xCD5C5CFF #define COLOR_INDIGO 0x4B0082FF #define COLOR_IVORY 0xFFFFF0FF #define COLOR_KHAKI 0xF0E68CFF #define COLOR_LAVENDER 0xE6E6FAFF #define COLOR_LAVENDERBLUSH 0xFFF0F5FF #define COLOR_LAWNGREEN 0x7CFC00FF #define COLOR_LEMONCHIFFON 0xFFFACDFF #define COLOR_LIGHTBLUE 0xADD8E6FF #define COLOR_LIGHTCORAL 0xF08080FF #define COLOR_LIGHTCYAN 0xE0FFFFFF #define COLOR_LIGHTGOLDENRODYELLOW 0xFAFAD2FF #define COLOR_LIGHTGRAY 0xD3D3D3FF #define COLOR_LIGHTGREEN 0x90EE90FF #define COLOR_LIGHTPINK 0xFFB6C1FF #define COLOR_LIGHTSALMON 0xFFA07AFF #define COLOR_LIGHTSEAGREEN 0x20B2AAFF #define COLOR_LIGHTSKYBLUE 0x87CEFAFF #define COLOR_LIGHTSLATEGRAY 0x778899FF #define COLOR_LIGHTSTEELBLUE 0xB0C4DEFF #define COLOR_LIGHTYELLOW 0xFFFFE0FF #define COLOR_LIME 0x00FF00FF #define COLOR_LIMEGREEN 0x32CD32FF #define COLOR_LINEN 0xFAF0E6FF #define COLOR_MAGENTA 0xFF00FFFF #define COLOR_MAROON 0x800000FF #define COLOR_MEDIUMAQUAMARINE 0x66CDAAFF #define COLOR_MEDIUMBLUE 0x0000CDFF #define COLOR_MEDIUMORCHID 0xBA55D3FF #define COLOR_MEDIUMPURPLE 0x9370DBFF #define COLOR_MEDIUMSEAGREEN 0x3CB371FF #define COLOR_MEDIUMSLATEBLUE 0x7B68EEFF #define COLOR_MEDIUMSPRINGGREEN 0x00FA9AFF #define COLOR_MEDIUMTURQUOISE 0x48D1CCFF #define COLOR_MEDIUMVIOLETRED 0xC71585FF #define COLOR_MIDNIGHTBLUE 0x191970FF #define COLOR_MINTCREAM 0xF5FFFAFF #define COLOR_MISTYROSE 0xFFE4E1FF #define COLOR_MOCCASIN 0xFFE4B5FF #define COLOR_NAVAJOWHITE 0xFFDEADFF #define COLOR_NAVY 0x000080FF #define COLOR_OLDLACE 0xFDF5E6FF #define COLOR_OLIVE 0x808000FF #define COLOR_OLIVEDRAB 0x6B8E23FF #define COLOR_ORANGE 0xFFA500FF #define COLOR_ORANGERED 0xFF4500FF #define COLOR_ORCHID 0xDA70D6FF #define COLOR_PALEGOLDENROD 0xEEE8AAFF #define COLOR_PALEGREEN 0x98FB98FF #define COLOR_PALETURQUOISE 0xAFEEEEFF #define COLOR_PALEVIOLETRED 0xDB7093FF #define COLOR_PAPAYAWHIP 0xFFEFD5FF #define COLOR_PEACHPUFF 0xFFDAB9FF #define COLOR_PERU 0xCD853FFF #define COLOR_PINK 0xFFC0CBFF #define COLOR_PLUM 0xDDA0DDFF #define COLOR_POWDERBLUE 0xB0E0E6FF #define COLOR_PURPLE 0x800080FF #define COLOR_RED 0xFF0000FF #define COLOR_ROSYBROWN 0xBC8F8FFF #define COLOR_ROYALBLUE 0x4169E1FF #define COLOR_SADDLEBROWN 0x8B4513FF #define COLOR_SALMON 0xFA8072FF #define COLOR_SANDYBROWN 0xF4A460FF #define COLOR_SEAGREEN 0x2E8B57FF #define COLOR_SEASHELL 0xFFF5EEFF #define COLOR_SIENNA 0xA0522DFF #define COLOR_SILVER 0xC0C0C0FF #define COLOR_SKYBLUE 0x87CEEBFF #define COLOR_SLATEBLUE 0x6A5ACDFF #define COLOR_SLATEGRAY 0x708090FF #define COLOR_SNOW 0xFFFAFAFF #define COLOR_SPRINGGREEN 0x00FF7FFF #define COLOR_STEELBLUE 0x4682B4FF #define COLOR_TAN 0xD2B48CFF #define COLOR_TEAL 0x008080FF #define COLOR_THISTLE 0xD8BFD8FF #define COLOR_TOMATO 0xFF6347FF #define COLOR_TURQUOISE 0x40E0D0FF #define COLOR_VIOLET 0xEE82EEFF #define COLOR_WHEAT 0xF5DEB3FF #define COLOR_WHITE 0xFFFFFFFF #define COLOR_WHITESMOKE 0xF5F5F5FF #define COLOR_YELLOW 0xFFFF00FF #define COLOR_YELLOWGREEN 0x9ACD32FF #define COLOR_BUTTONFACE 0xF0F0F0FF #define COLOR_BUTTONHIGHLIGHT 0xFFFFFFFF #define COLOR_BUTTONSHADOW 0xA0A0A0FF #define COLOR_GRADIENTACTIVECAPTION 0xB9D1EAFF #define COLOR_GRADIENTINACTIVECAPTION 0xD7E4F2FF #define COLOR_MENUBAR 0xF0F0F0FF #define COLOR_MENUHIGHLIGHT 0x3399FFFF // (FF)TeddyBear #define COLOR_TEDDY 0x8A946BFF // System Defined Colors #define COLOR_ACTIVEBORDER 0xB4B4B4FF #define COLOR_ACTIVECAPTION 0x99B4D1FF #define COLOR_ACTIVECAPTIONTEXT 0x000000FF #define COLOR_ALICEBLUE 0xF0F8FFFF #define COLOR_ANTIQUEWHITE 0xFAEBD7FF #define COLOR_APPWORKSPACE 0xABABABFF #define COLOR_AQUA 0x00FFFFFF #define COLOR_AQUAMARINE 0x7FFFD4FF #define COLOR_AZURE 0xF0FFFFFF #define COLOR_BEIGE 0xF5F5DCFF #define COLOR_BISQUE 0xFFE4C4FF #define COLOR_BLACK 0x000000FF #define COLOR_BLANCHEDALMOND 0xFFEBCDFF #define COLOR_BLUE 0x0000FFFF #define COLOR_BLUEVIOLET 0x8A2BE2FF #define COLOR_BROWN 0xA52A2AFF #define COLOR_BURLYWOOD 0xDEB887FF #define COLOR_BUTTONFACE 0xF0F0F0FF #define COLOR_BUTTONHIGHLIGHT 0xFFFFFFFF #define COLOR_BUTTONSHADOW 0xA0A0A0FF #define COLOR_CADETBLUE 0x5F9EA0FF #define COLOR_CHARTREUSE 0x7FFF00FF #define COLOR_CHOCOLATE 0xD2691EFF #define COLOR_CONTROL 0xF0F0F0FF #define COLOR_CONTROLDARK 0xA0A0A0FF #define COLOR_CONTROLDARKDARK 0x696969FF #define COLOR_CONTROLLIGHT 0xE3E3E3FF #define COLOR_CONTROLLIGHTLIGHT 0xFFFFFFFF #define COLOR_CONTROLTEXT 0x000000FF #define COLOR_CORAL 0xFF7F50FF #define COLOR_CORNFLOWERBLUE 0x6495EDFF #define COLOR_CORNSILK 0xFFF8DCFF #define COLOR_CRIMSON 0xDC143CFF #define COLOR_CYAN 0x00FFFFFF #define COLOR_DARKBLUE 0x00008BFF #define COLOR_DARKCYAN 0x008B8BFF #define COLOR_DARKGOLDENROD 0xB8860BFF #define COLOR_DARKGRAY 0xA9A9A9FF #define COLOR_DARKGREEN 0x006400FF #define COLOR_DARKKHAKI 0xBDB76BFF #define COLOR_DARKMAGENTA 0x8B008BFF #define COLOR_DARKOLIVEGREEN 0x556B2FFF #define COLOR_DARKORANGE 0xFF8C00FF #define COLOR_DARKORCHID 0x9932CCFF #define COLOR_DARKRED 0x8B0000FF #define COLOR_DARKSALMON 0xE9967AFF #define COLOR_DARKSEAGREEN 0x8FBC8BFF #define COLOR_DARKSLATEBLUE 0x483D8BFF #define COLOR_DARKSLATEGRAY 0x2F4F4FFF #define COLOR_DARKTURQUOISE 0x00CED1FF #define COLOR_DARKVIOLET 0x9400D3FF #define COLOR_DEEPPINK 0xFF1493FF #define COLOR_DEEPSKYBLUE 0x00BFFFFF #define COLOR_DESKTOP 0x000000FF #define COLOR_DIMGRAY 0x696969FF #define COLOR_DODGERBLUE 0x1E90FFFF #define COLOR_FIREBRICK 0xB22222FF #define COLOR_FLORALWHITE 0xFFFAF0FF #define COLOR_FORESTGREEN 0x228B22FF #define COLOR_FUCHSIA 0xFF00FFFF #define COLOR_GAINSBORO 0xDCDCDCFF #define COLOR_GHOSTWHITE 0xF8F8FFFF #define COLOR_GOLD 0xFFD700FF #define COLOR_GOLDENROD 0xDAA520FF #define COLOR_GRADIENTACTIVECAPTION 0xB9D1EAFF #define COLOR_GRADIENTINACTIVECAPTION 0xD7E4F2FF #define COLOR_GRAY 0x808080FF #define COLOR_GRAYTEXT 0x808080FF #define COLOR_GREEN 0x008000FF #define COLOR_GREENYELLOW 0xADFF2FFF #define COLOR_HIGHLIGHT 0x3399FFFF #define COLOR_HIGHLIGHTTEXT 0xFFFFFFFF #define COLOR_HONEYDEW 0xF0FFF0FF #define COLOR_HOTPINK 0xFF69B4FF #define COLOR_HOTTRACK 0x0066CCFF #define COLOR_INACTIVEBORDER 0xF4F7FCFF #define COLOR_INACTIVECAPTION 0xBFCDDBFF #define COLOR_INACTIVECAPTIONTEXT 0x434E54FF #define COLOR_INDIANRED 0xCD5C5CFF #define COLOR_INDIGO 0x4B0082FF #define COLOR_INFO 0xFFFFE1FF #define COLOR_INFOTEXT 0x000000FF #define COLOR_IVORY 0xFFFFF0FF #define COLOR_KHAKI 0xF0E68CFF #define COLOR_LAVENDER 0xE6E6FAFF #define COLOR_LAVENDERBLUSH 0xFFF0F5FF #define COLOR_LAWNGREEN 0x7CFC00FF #define COLOR_LEMONCHIFFON 0xFFFACDFF #define COLOR_LIGHTBLUE 0xADD8E6FF #define COLOR_LIGHTCORAL 0xF08080FF #define COLOR_LIGHTCYAN 0xE0FFFFFF #define COLOR_LIGHTGOLDENRODYELLOW 0xFAFAD2FF #define COLOR_LIGHTGRAY 0xD3D3D3FF #define COLOR_LIGHTGREEN 0x90EE90FF #define COLOR_LIGHTPINK 0xFFB6C1FF #define COLOR_LIGHTSALMON 0xFFA07AFF #define COLOR_LIGHTSEAGREEN 0x20B2AAFF #define COLOR_LIGHTSKYBLUE 0x87CEFAFF #define COLOR_LIGHTSLATEGRAY 0x778899FF #define COLOR_LIGHTSTEELBLUE 0xB0C4DEFF #define COLOR_LIGHTYELLOW 0xFFFFE0FF #define COLOR_LIME 0x00FF00FF #define COLOR_LIMEGREEN 0x32CD32FF #define COLOR_LINEN 0xFAF0E6FF #define COLOR_MAGENTA 0xFF00FFFF #define COLOR_MAROON 0x800000FF #define COLOR_MEDIUMAQUAMARINE 0x66CDAAFF #define COLOR_MEDIUMBLUE 0x0000CDFF #define COLOR_MEDIUMORCHID 0xBA55D3FF #define COLOR_MEDIUMPURPLE 0x9370DBFF #define COLOR_MEDIUMSEAGREEN 0x3CB371FF #define COLOR_MEDIUMSLATEBLUE 0x7B68EEFF #define COLOR_MEDIUMSPRINGGREEN 0x00FA9AFF #define COLOR_MEDIUMTURQUOISE 0x48D1CCFF #define COLOR_MEDIUMVIOLETRED 0xC71585FF #define COLOR_MENU 0xF0F0F0FF #define COLOR_MENUBAR 0xF0F0F0FF #define COLOR_MENUHIGHLIGHT 0x3399FFFF #define COLOR_MENUTEXT 0x000000FF #define COLOR_MIDNIGHTBLUE 0x191970FF #define COLOR_MINTCREAM 0xF5FFFAFF #define COLOR_MISTYROSE 0xFFE4E1FF #define COLOR_MOCCASIN 0xFFE4B5FF #define COLOR_NAVAJOWHITE 0xFFDEADFF #define COLOR_NAVY 0x000080FF #define COLOR_OLDLACE 0xFDF5E6FF #define COLOR_OLIVE 0x808000FF #define COLOR_OLIVEDRAB 0x6B8E23FF #define COLOR_ORANGE 0xFFA500FF #define COLOR_ORANGERED 0xFF4500FF #define COLOR_ORCHID 0xDA70D6FF #define COLOR_PALEGOLDENROD 0xEEE8AAFF #define COLOR_PALEGREEN 0x98FB98FF #define COLOR_PALETURQUOISE 0xAFEEEEFF #define COLOR_PALEVIOLETRED 0xDB7093FF #define COLOR_PAPAYAWHIP 0xFFEFD5FF #define COLOR_PEACHPUFF 0xFFDAB9FF #define COLOR_PERU 0xCD853FFF #define COLOR_PINK 0xFFC0CBFF #define COLOR_PLUM 0xDDA0DDFF #define COLOR_POWDERBLUE 0xB0E0E6FF #define COLOR_PURPLE 0x800080FF #define COLOR_RED 0xFF0000FF #define COLOR_ROSYBROWN 0xBC8F8FFF #define COLOR_ROYALBLUE 0x4169E1FF #define COLOR_SADDLEBROWN 0x8B4513FF #define COLOR_SALMON 0xFA8072FF #define COLOR_SANDYBROWN 0xF4A460FF #define COLOR_SCROLLBAR 0xC8C8C8FF #define COLOR_SEAGREEN 0x2E8B57FF #define COLOR_SEASHELL 0xFFF5EEFF #define COLOR_SIENNA 0xA0522DFF #define COLOR_SILVER 0xC0C0C0FF #define COLOR_SKYBLUE 0x87CEEBFF #define COLOR_SLATEBLUE 0x6A5ACDFF #define COLOR_SLATEGRAY 0x708090FF #define COLOR_SNOW 0xFFFAFAFF #define COLOR_SPRINGGREEN 0x00FF7FFF #define COLOR_STEELBLUE 0x4682B4FF #define COLOR_TAN 0xD2B48CFF #define COLOR_TEAL 0x008080FF #define COLOR_THISTLE 0xD8BFD8FF #define COLOR_TOMATO 0xFF6347FF #define COLOR_TRANSPARENT 0xFFFFFF00 #define COLOR_TURQUOISE 0x40E0D0FF #define COLOR_VIOLET 0xEE82EEFF #define COLOR_WHEAT 0xF5DEB3FF #define COLOR_WHITE 0xFFFFFFFF #define COLOR_WHITESMOKE 0xF5F5F5FF #define COLOR_WINDOW 0xFFFFFFFF #define COLOR_WINDOWFRAME 0x646464FF #define COLOR_WINDOWTEXT 0x000000FF #define COLOR_YELLOW 0xFFFF00FF #define COLOR_YELLOWGREEN 0x9ACD32FF //Defines// //New// new BankDeliveryJob[256]; new SleepLevel[MAX_PLAYERS]; new Bar:SleepBar[MAX_PLAYERS]; new Text:SleepTD; new Text:SleepScreanTD; new Sleeping[MAX_PLAYERS]; //New// //Stocks// stock ProcessChatText(playerid, text[]) { new useindex=1; // Handle shouting prefix (!) if(text[0] == '!' && strlen(text) > 1) { if(text[1] == ' ') useindex++; TalkMessage(SHOUT_DISTANCE, playerid, "*shouts*", text[useindex]); return; } // Handle quiet prefix (#) if(text[0] == '#' && strlen(text) > 1) { if(text[1] == ' ') useindex++; TalkMessage(LOW_DISTANCE, playerid, "*quietly*", text[useindex]); return; } // Send to other players in range and fade TalkMessage(TALK_DISTANCE, playerid, "", text); } new gOOCDisabled = false; stock GlobalOOCMessage(playerid, message[]) { new msg[256+1]; new PlayerName[MAX_PLAYER_NAME+1]; if(gOOCDisabled) { CmdErrorMessage(playerid, "The OOC channel is not enabled right now"); return; } GetPlayerName(playerid, PlayerName, sizeof(PlayerName)); format(msg, 256, "(( %s: %s ))", PlayerName, message); for(new i = 0; i < MAX_PLAYERS; i++) { // for every player if(IsPlayerConnected(i)) { // Todo: check if player accepts occ PlayerMessage(i, OOC_COLOR, msg); } } } stock ProcessActionText(playerid, message[], actiontype) { new ActionText[256+1]; new ActionBubble[MAX_CHATBUBBLE_LENGTH+1]; new PlayerName[MAX_PLAYER_NAME+1]; GetPlayerName(playerid, PlayerName, sizeof(PlayerName)); if(actiontype == ACTION_DO) { format(ActionText, 256, "* %s ((%s))", message, PlayerName); format(ActionBubble, MAX_CHATBUBBLE_LENGTH, "* (( %s ))", message); } else { format(ActionText, 256, "* %s %s", PlayerName, message); format(ActionBubble, MAX_CHATBUBBLE_LENGTH, "* %s", message); } LocalMessage(ACTION_DISTANCE, playerid, ACTION_COLOR, ActionText); SetPlayerChatBubble(playerid, ActionBubble, ACTION_COLOR, ACTION_DISTANCE, CHAT_BUBBLE_TIME); } stock ToggleOOC(playerid) { if(IsPlayerAdmin(playerid)) { // toggle it if(gOOCDisabled) gOOCDisabled = false; else gOOCDisabled = true; if(!gOOCDisabled) { GlobalMessage(GENERAL_COLOR, "{D0D0D0}[ooc] channel is {80CC80}enabled"); } else { GlobalMessage(GENERAL_COLOR, "{D0D0D0}[ooc] channel is {CC8080}disabled"); } } else { CmdErrorMessage(playerid, "Your admin level isn't high enough to change this"); } } stock ProcessLocalOOC(playerid, message[]) { new new_message[256+1]; new PlayerName[MAX_PLAYER_NAME+1]; GetPlayerName(playerid, PlayerName, sizeof(PlayerName)); format(new_message, 256, "%s (( %s ))", PlayerName, message); LocalMessage(TALK_DISTANCE, playerid, LOCAL_TALK_COLOR, new_message); } stock ProcessMegaphone(playerid, message[]) { // Todo: add permissions on megaphone usage new new_message[256+1]; new PlayerName[MAX_PLAYER_NAME+1]; GetPlayerName(playerid, PlayerName, sizeof(PlayerName)); format(new_message, 256, "(megaphone) %s >> %s", PlayerName, message); LocalMessage(MEGAPHONE_DISTANCE, playerid, MEGAPHONE_COLOR, new_message, 1); } stock ProcessWhisper(playerid, toplayerid, message[]) { new PlayerName[MAX_PLAYER_NAME+1]; new ToPlayerName[MAX_PLAYER_NAME+1]; new PmMessage[256+1]; GetPlayerName(playerid,PlayerName,sizeof(PlayerName)); GetPlayerName(toplayerid,ToPlayerName,sizeof(ToPlayerName)); format(PmMessage, sizeof(PmMessage), ">> %s(%d): %s", ToPlayerName, toplayerid, message); PlayerMessage(playerid, WHISPER_COLOR, PmMessage); format(PmMessage, sizeof(PmMessage), "** %s(%d): %s", PlayerName, playerid, message); PlayerMessage(toplayerid, WHISPER_COLOR, PmMessage); PlayerPlaySound(toplayerid, 1085, 0.0, 0.0, 0.0); } stock ProcessChatCommands(playerid, cmdtext[]) { new cmd[256+1]; new message[256+1]; new tmp[256+1]; new idx; cmd = strtok(cmdtext, idx); // Action commands if(!strcmp("/me", cmd, true)) { message = strrest(cmdtext,idx); if(!strlen(message)) { CmdUsageMessage(playerid, "/me [action]"); return 1; } ProcessActionText(playerid, message, ACTION_ME); return 1; } if(!strcmp("/do", cmd, true)) { message = strrest(cmdtext,idx); if(!strlen(message)) { CmdUsageMessage(playerid, "/do [action]"); return 1; } ProcessActionText(playerid, message, ACTION_DO); return 1; } // Talk commands // /low if(!strcmp("/l", cmd, true) || !strcmp("/low", cmd, true)) { message = strrest(cmdtext,idx); if(!strlen(message)) { CmdUsageMessage(playerid, "(/l)ow [text]"); return 1; } TalkMessage(LOW_DISTANCE, playerid, "*quietly*", message); return 1; } // /shout if(!strcmp("/s", cmd, true) || !strcmp("/shout", cmd, true)) { message = strrest(cmdtext,idx); if(!strlen(message)) { CmdUsageMessage(playerid, "(/s)hout [text]"); return 1; } TalkMessage(SHOUT_DISTANCE, playerid, "*shouts*", message); return 1; } // /b (local ooc) if(!strcmp("/b", cmd, true)) { message = strrest(cmdtext,idx); if(!strlen(message)) { CmdUsageMessage(playerid, "/b [text]"); return 1; } ProcessLocalOOC(playerid, message); return 1; } // /megaphone if(!strcmp("/m", cmd, true) || !strcmp("/megaphone", cmd, true)) { message = strrest(cmdtext,idx); if(!strlen(message)) { CmdUsageMessage(playerid, "(/m)egaphone [text]"); return 1; } ProcessMegaphone(playerid, message); return 1; } // Global OOC /o and /ooc if(!strcmp("/o", cmd, true) || !strcmp("/ooc", cmd, true)) { message = strrest(cmdtext,idx); if(!strlen(message)) { CmdUsageMessage(playerid, "(/o)oc [text]"); return 1; } GlobalOOCMessage(playerid, message); return 1; } // Toggle the OOC channel /togooc if(!strcmp("/togooc", cmd, true)) { ToggleOOC(playerid); return 1; } // /whisper /pm if(!strcmp("/w", cmd, true) || !strcmp("/wisper", cmd, true) || !strcmp("/pm", cmd, true)) { tmp = strtok(cmdtext,idx); if(!strlen(tmp)) { CmdUsageMessage(playerid, "(/w)isper [playerid/PartOfName] [whisper text]"); return 1; } new toplayerid = ReturnUser(tmp); if(toplayerid == RETURN_USER_MULTIPLE) { CmdErrorMessage(playerid, "Multiple matches found for [name]. Please narrow the search."); return 1; } if(toplayerid == RETURN_USER_FAILURE || !IsPlayerConnected(toplayerid)) { CmdErrorMessage(playerid, "That player isn't connected right now."); return 1; } message = strrest(cmdtext,idx); if(!strlen(message)) { CmdUsageMessage(playerid, "(/w)isper [playerid/PartOfName] [whisper text]"); return 1; } if(IsPlayerConnected(toplayerid)) { ProcessWhisper(playerid, toplayerid, message); } return 1; } return 0; } //Stocks// //Forwards// forward SleepTimer(playerid); forward Sleep2(playerid); forward SleepOutSide(playerid); forward SleepT3(playerid); forward SleepTime4(playerid); //Forwards// main() { print("\n----------------------------------"); print(" Blank Gamemode by your name here"); print("----------------------------------\n"); } public OnGameModeInit() { SetGameModeText("AOR 1.1"); SetTimer("SleepTimer", 720000, true);//720000 = 12 Minuts /*------------------------------------------------------------------------*/ SleepTD = TextDrawCreate(64.187408, 314.416717, "SLEEP"); TextDrawLetterSize(SleepTD, 0.336149, 1.279165); TextDrawAlignment(SleepTD, 1); TextDrawColor(SleepTD, -1); TextDrawSetShadow(SleepTD, 0); TextDrawSetOutline(SleepTD, 1); TextDrawBackgroundColor(SleepTD, 51); TextDrawFont(SleepTD, 2); TextDrawSetProportional(SleepTD, 1); SleepScreanTD = TextDrawCreate(641.531494, 1.500000, "usebox"); TextDrawLetterSize(SleepScreanTD, 0.000000, 49.396297); TextDrawTextSize(SleepScreanTD, -2.000000, 0.000000); TextDrawAlignment(SleepScreanTD, 1); TextDrawColor(SleepScreanTD, 0); TextDrawUseBox(SleepScreanTD, true); TextDrawBoxColor(SleepScreanTD, 144); TextDrawSetShadow(SleepScreanTD, 0); TextDrawSetOutline(SleepScreanTD, 0); TextDrawFont(SleepScreanTD, 0); AddStaticVehicle(459,1250.6285,-1834.1301,13.4423,1.4745,51,51); // BankDelivery1 AddStaticVehicle(459,1249.4926,-1811.6958,13.4739,185.6842,51,51); // BankDelivery2 AddStaticVehicle(459,1280.0493,-1833.0886,13.4418,90.2655,51,51); // BankDelivery3 AddStaticVehicle(459,1280.4384,-1821.6753,13.4100,92.3024,51,51); // BankDelivery4 AddStaticVehicle(459,1280.5349,-1811.7463,13.4370,89.3390,51,51); // BankDelivery5 AddStaticVehicle(459,1279.1827,-1801.5844,13.4368,84.7064,51,51); // BankDelivery6 return 1; } public OnPlayerConnect(playerid) { SleepLevel[playerid] = 0; TextDrawShowForPlayer(playerid, SleepTD); SleepBar[playerid] = CreateProgressBar(60.000000, 329.000000, 52.500000, 6.199999, 16755455, 5); SetProgressBarValue(SleepBar[playerid], SleepLevel[playerid]); ShowProgressBarForPlayer(playerid, SleepBar[playerid]); new plname[MAX_PLAYER_NAME]; new namestring = strfind(plname, "_", true); if(namestring == -1) { SendClientMessage(playerid, COLOR_YELLOW, "Human Resources Department: Your name is not acceptable."); SendClientMessage(playerid, COLOR_YELLOW, "Hint: Your name must be in the format Firstname_Lastname."); Kick(playerid); return 1; } return 1; } public OnPlayerDisconnect(playerid, reason) { KillTimer(SleepTimer(playerid)); return 1; } public OnPlayerSpawn(playerid) { SetPlayerPos(playerid,1172.7722,-1323.9147,15.4009); return 1; } public OnPlayerDeath(playerid, killerid, reason) { SCM(playerid,COLOR_YELLOW, "* The medics in All Saints Hospital healed you. Be careful next time. Thank You"); SCM(playerid,COLOR_YELLOW, "* You were deducted by $200 for your medical bill."); GivePlayerMoney(playerid, -200); return 1; } public OnVehicleSpawn(vehicleid) { return 1; } public OnVehicleDeath(vehicleid, killerid) { return 1; } public OnPlayerText(playerid, text[]) { ProcessChatText(playerid, text); return 0; } public OnPlayerCommandText(playerid, cmdtext[]) { if(ProcessChatCommands(playerid,cmdtext)) { return 1; } if (strcmp("/bdelivery", cmdtext, true, 10) == 0) { if(GetVehicleModel(GetPlayerVehicleID(playerid)) == 459) { BankDeliveryJob[playerid] = 1; new name[MAX_PLAYER_NAME], string[48]; GetPlayerName(playerid, name, sizeof(name)); format(string, sizeof(string), "* %s is now a Bank Delivery boy.", name ); SendClientMessageToAll(COLOR_YELLOW, string); SetPlayerCheckpoint(playerid,1212.9279,-1815.9828,16.5938,79); SendClientMessage(playerid,COLOR_YELLOW,"* Dave: You have been given the coordinates to the bank. Deliver it there."); return 1; } SendClientMessage(playerid, COLOR_RED,"You have to be on a delivery truck to start the job!"); } return 1; } if (strcmp("/sleep", cmdtext, true, 10) == 0) { if(SleepLevel[playerid] != 0) { TogglePlayerControllable(playerid, 0); TextDrawShowForPlayer(playerid, SleepScreanTD); SetPlayerInterior(playerid, 15); SetPlayerPos(playerid,2229.4648,-1161.7744,1030.4410); SetPlayerFacingAngle(playerid, -90.0); ApplyAnimation(playerid,"CRACK","crckdeth2",4.0, 1, 0, 0, 0, 0); SetPlayerCameraPos(playerid, 2231.8608,-1161.0271,1031.3776); SetPlayerCameraLookAt(playerid,2228.0371,-1161.6714,1029.1803); GameTextForPlayer(playerid, "~w~Sleeping....", 5000, 1); Sleeping[playerid] = 1; SetTimerEx("Sleep2", 12000, false, "i", playerid); } else { SendClientMessage(playerid, 0xFFFFFF, "{FF0000}[{FFFFFF}Brain{FF0000}]{808080} You have no desire to sleep!"); return 1; } return 1; } return 0; } public OnPlayerEnterVehicle(playerid, vehicleid, ispassenger) { if(GetVehicleModel(GetPlayerVehicleID(playerid)) == 448) { SendClientMessage(playerid, COLOR_RED, "* You can start the delivery by using /bdelivery"); } return 0; } public OnPlayerEnterCheckpoint(playerid) { if(GetVehicleModel(GetPlayerVehicleID(playerid)) == 448) { if(BankDeliveryJob[playerid] == 1){ BankDeliveryJob[playerid] = 2; SetPlayerCheckpoint(playerid,1252.3911,-1818.8015,13.4085,74); SendClientMessage(playerid,COLOR_YELLOW,"* Bank Manager: You better go back to Dave and get your reward."); return 1; } if(BankDeliveryJob[playerid] == 2){ BankDeliveryJob[playerid] = 0; SendClientMessage(playerid,COLOR_YELLOW,"* Dave: Back so fast! Looks like you have earn it."); SendClientMessage(playerid,COLOR_GREEN, "* Dave has given you $30,000! Good Job!"); GivePlayerMoney(playerid,30000); return 1; } } return 1; } public OnPlayerStateChange(playerid, newstate, oldstate) { return 1; } public OnPlayerLeaveCheckpoint(playerid) { return 1; } public OnPlayerEnterRaceCheckpoint(playerid) { return 1; } public OnPlayerLeaveRaceCheckpoint(playerid) { return 1; } public OnRconCommand(cmd[]) { return 1; } public OnPlayerRequestSpawn(playerid) { return 1; } public OnObjectMoved(objectid) { return 1; } public OnPlayerObjectMoved(playerid, objectid) { return 1; } public OnPlayerPickUpPickup(playerid, pickupid) { return 1; } public OnVehicleMod(playerid, vehicleid, componentid) { return 1; } public OnVehiclePaintjob(playerid, vehicleid, paintjobid) { return 1; } public OnVehicleRespray(playerid, vehicleid, color1, color2) { return 1; } public OnPlayerSelectedMenuRow(playerid, row) { return 1; } public OnPlayerExitedMenu(playerid) { return 1; } public OnPlayerInteriorChange(playerid, newinteriorid, oldinteriorid) { return 1; } public OnPlayerKeyStateChange(playerid, newkeys, oldkeys) { return 1; } public OnRconLoginAttempt(ip[], password[], success) { return 1; } public OnPlayerUpdate(playerid) { return 1; } public OnPlayerStreamIn(playerid, forplayerid) { return 1; } public OnPlayerStreamOut(playerid, forplayerid) { return 1; } public OnVehicleStreamIn(vehicleid, forplayerid) { return 1; } public OnVehicleStreamOut(vehicleid, forplayerid) { return 1; } public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[]) { return 1; } public OnPlayerClickPlayer(playerid, clickedplayerid, source) { return 1; } public SleepTimer(playerid) { for(new i=0;i<MAX_PLAYERS;i++) { if(IsPlayerConnected(i)) { if(SleepLevel[i] == 5) { SendClientMessage(i, 0xFFFFFF, "{00FF00}[{FFFFFF}Brain{00FF00}]{808080} You end up falling asleep because you're too tired!"); TogglePlayerControllable(i, 0); ApplyAnimation(i,"CRACK","crckdeth2",4.0, 1, 0, 0, 0, 0); GameTextForPlayer(i, "~w~Sleeping....", 5000, 1); SetTimerEx("SleepOutSide", 12000, false, "i", i); Sleeping[playerid] = 1; return 1; } if(SleepLevel[i] == 4) { SendClientMessage(i, 0xFFFFFF, "{00FF00}[{FFFFFF}Brain{00FF00}]{808080} You're getting sleepy, go to sleep!"); SleepLevel[i] = 5; SetTimerEx("SleepT3", 600, false, "i", i); SetProgressBarValue(SleepBar[i], SleepLevel[i]); UpdateProgressBar(SleepBar[i], i); } else { SleepLevel[i] += 1; SetProgressBarValue(SleepBar[i], SleepLevel[i]); UpdateProgressBar(SleepBar[i], i); } } } return 1; } public Sleep2(playerid) { TextDrawHideForPlayer(playerid, SleepScreanTD); SleepLevel[playerid] = 0; SetProgressBarValue(SleepBar[playerid], SleepLevel[playerid]); UpdateProgressBar(SleepBar[playerid], playerid); TogglePlayerControllable(playerid, 1); Sleeping[playerid] = 0; SpawnPlayer(playerid); SendClientMessage(playerid, 0xFFFFFF, "{00FF00}[{FFFFFF}Brain{00FF00}]{808080} You just woke up, Is like you are born again!"); return 1; } public SleepOutSide(playerid) { TextDrawHideForPlayer(playerid, SleepScreanTD); SleepLevel[playerid] = 3; SetProgressBarValue(SleepBar[playerid], SleepLevel[playerid]); UpdateProgressBar(SleepBar[playerid], playerid); TogglePlayerControllable(playerid, 1); SetCameraBehindPlayer(playerid); ClearAnimations(playerid); Sleeping[playerid] = 0; SendClientMessage(playerid, 0xFFFFFF, "{00FF00}[{FFFFFF}Brain{00FF00}]{808080} You just woke up, but you still feel very tired!"); return 1; } public SleepT3(playerid) { if(SleepLevel[playerid] >= 4) { if(Sleeping[playerid] == 0) { TextDrawShowForPlayer(playerid, SleepScreanTD); SetTimerEx("SleepTime4", 1000, false, "i", playerid); } } return 1; } public SleepTime4(playerid) { if(Sleeping[playerid] == 0) { TextDrawHideForPlayer(playerid, SleepScreanTD); SetTimerEx("SleepT3", 1000, false, "i", playerid); } return 1; }
Код:
if (strcmp("/sleep", cmdtext, true, 10) == 0) { if(SleepLevel[playerid] != 0) { TogglePlayerControllable(playerid, 0); TextDrawShowForPlayer(playerid, SleepScreanTD); SetPlayerInterior(playerid, 15); SetPlayerPos(playerid,2229.4648,-1161.7744,1030.4410); SetPlayerFacingAngle(playerid, -90.0); ApplyAnimation(playerid,"CRACK","crckdeth2",4.0, 1, 0, 0, 0, 0); SetPlayerCameraPos(playerid, 2231.8608,-1161.0271,1031.3776); SetPlayerCameraLookAt(playerid,2228.0371,-1161.6714,1029.1803); GameTextForPlayer(playerid, "~w~Sleeping....", 5000, 1); Sleeping[playerid] = 1; SetTimerEx("Sleep2", 12000, false, "i", playerid); } else { SendClientMessage(playerid, 0xFFFFFF, "{FF0000}[{FFFFFF}Brain{FF0000}]{808080} You have no desire to sleep!"); return 1; } return 1; } return 0; }