/*===================================================================================================*\ ||===================================================================================================|| || ________ ________ ___ _ ______ ______ ________ || || \ | _____| | ____ | | \ | | | _ \ | _ \ | ____ | / || || ======== \ | |_____ | |____| | | |\ \ | | | | | | | |_| / | |____| | / ======== || || | | _____ | | ____ | | | \ \| | | | | | | _ \ | ____ | | || || ======== / ______| | | | | | | | \ \ | | |_| | | | \ \ | | | | \ ======== || || / |________| |_| |_| |_| \__| |______/ |_| \_| |_| |_| \ || || || ||===================================================================================================|| || Created on the 10th of June 2008 by =>Sandra<= || || Do NOT remove any credits!! || \*===================================================================================================*/ #include new PawnFunctions[][] = { "acos", "AddMenuItem", "AddPlayerClass", "AddPlayerClassEx", "AddStaticPickup", "AddStaticVehicle", "AddStaticVehicleEx", "AddVehicleComponent", "AllowAdminTeleport", "AllowInteriorWeapons", "AllowPlayerTeleport", "ApplyAnimation", "asin", "atan", "atan2", "AttachObjectToPlayer", "AttachPlayerObjectToPlayer", "AttachTrailerToVehicle", "Ban", "BanEx", "CallLocalFunction", "CallRemoteFunction", "ChangeVehicleColor", "ChangeVehiclePaintJob", "ClearAnimations", "CreateExplosion", "CreateMenu", "CreateObject", "CreatePickup", "CreatePlayerObject", "CreateVehicle", "DestroyMenu", "DestroyObject", "DestroyPickup", "DestroyPlayerObject", "DestroyVehicle", "DetachTrailerFromVehicle", "DisableInteriorEnterExits", "DisableMenu", "DisableMenuRow", "DisablePlayerCheckpoint", "DisablePlayerRaceCheckpoint", "EnableStuntBonusForAll", "EnableStuntBonusForPlayer", "EnableTirePopping", "EnableZoneNames", "fclose", "fexists", "fopen", "fread", "fremove", "fwrite", "ForceClassSelection", "format", "GameModeExit", "GameTextForAll", "GameTextForPlayer", "GangZoneCreate", "GangZoneDestroy", "GangZoneFlashForAll, ", "GangZoneFlashForPlayer", "GangZoneHideForAll", "GangZoneHideForPlayer", "GangZoneShowForAll", "GangZoneShowForPlayer", "GangZoneStopFlashForAll", "GangZoneStopFlashForPlayer", "GetMaxPlayers", "GetObjectPos", "GetObjectRot", "GetPlayerAmmo", "GetPlayerArmour", "GetPlayerColor", "GetPlayerFacingAngle", "GetPlayerHealth", "GetPlayerInterior", "GetPlayerIp", "GetPlayerKeys", "GetPlayerMenu", "GetPlayerMoney", "GetPlayerName", "GetPlayerObjectPos", "GetPlayerObjectRot", "GetPlayerPing", "GetPlayerPos", "GetPlayerPos", "GetPlayerScore", "GetPlayerSkin", "GetPlayerSpecialAction", "GetPlayerState", "GetPlayerTeam", "GetPlayerTime", "GetPlayerVehicleID", "GetPlayerVirtualWorld", "GetPlayerWantedLevel", "GetPlayerWeapon", "GetPlayerWeaponData", "GetServerVarAsBool", "GetServerVarAsInt", "GetServerVasAsString", "GetVehicleHealth", "GetVehicleModel", "GetVehiclePos", "GetVehicleTrailer", "GetVehicleVirtualWorld", "GetVehicleZAngle", "GetWeaponName", "getdate", "gettime", "GivePlayerMoney", "GivePlayerWeapon", "HideMenuForPlayer", "IsPlayerAdmin", "IsPlayerConnected", "IsPlayerInAnyVehicle", "IsPlayerInCheckpoint", "IsPlayerInRaceCheckpoint", "IsTrailerAttachedToVehicle", "IsValidMenu", "IsValidObject", "IsValidPlayerObject", "Kick", "KilTimer", "LimitGlobalChatRadius", "LinkVehicleToInterior", "MoveObject", "MovePlayerObject", "PlayerPlaySound", "PlayerSpectatePlayer", "PlayerSpectateVehicle", "print", "printf", "PutPlayerInVehicle", "random", "RemovePlayerFromVehicle", "RemovePlayerMapIcon", "RemoveVehicleComponent", "ResetPlayerMoney", "ResetPlayerWeapons", "SendClientMessage", "SendClientMessageToAll", "SendDeathMessage", "SendPlayerMessageToAll", "SendPlayerMessageToPlayer", "SendRconCommand", "SetCameraBehindPlayer", "SetDeathDropAmount", "SetDisabledWeapons", "SetGameModeText", "SetGravity", "SetMenuColumnHeader", "SetNameTagDrawDistance", "SetObjectPos", "SetObjectRot", "SetPlayerAmmo", "SetPlayerArmour", "SetPlayerCameraLookAt", "SetPlayerCameraPos", "SetPlayerCheckpoint", "SetPlayerColor", "SetPlayerDisabledWeapons", "SetPlayerFacingAngle", "SetPlayerHealth", "SetPlayerInterior", "SetPlayerMapIcon", "SetPlayerMarkerForPlayer", "SetPlayerName", "SetPlayerObjectPos", "SetPlayerObjectRot", "SetPlayerPos", "SetPlayerPosFindZ", "SetPlayerRaceCheckpoint", "SetPlayerScore", "SetPlayerSkin", "SetPlayerSpecialAction", "SetPlayerTeam", "SetPlayerTime", "SetPlayeVirtualWorld", "SetPlayerWantedLevel", "SetPlayerWeather", "SetPlayerWorldBounds", "SetSpawnInfo", "SetTeamCount", "SetTimer", "SetTimerEx", "SetVehicleHealth", "SetVehicleNumberPlate", "SetVehicleParamsForPlayer", "SetVehiclePos", "SetVehicleToRespawn", "SetVehicleVirtualWorld", "SetVehicleZAngle", "SetWeater", "SetWorldTime", "ShowMenuForPlayer", "ShowNameTags", "ShowPlayerMarkers", "ShowPlayerNameTagForPlayer", "SpawnPlayer", "StopObject", "StopPlayerObject", "strcmp", "strlen", "strmid", "strval", "strfind", "strins", "TextDrawAlignment", "TextDrawBackgroundColor", "TextDrawBoxColor", "TextDrawColor", "TextDrawCreate", "TextDrawDestroy", "TextDrawFont", "TextDrawHideForAll", "TextDrawHideForPlayer", "TextDrawLetterSize", "TextDrawSetOutline", "TextDrawProportional", "TextDrawSetShadow", "TextDrawSetString", "TextDrawShowForAll", "TextDrawShowForPlayer", "TextDrawTextSize", "TextDrawUseBox", "GetTickCount", "TogglePlayerClock", "TogglePlayerControllable", "UsePlayerPedAnims" }; new FunctionCounts[sizeof(PawnFunctions)]; new OtherFunctions[][] = { "#define", "{", "}" }; new OtherFunctionCounts[sizeof(OtherFunctions)]; new TotalLines; public OnFilterScriptInit() { print("--------------------------------------"); print(" Script-Debug by =>Sandra<= "); print(" succesfully loaded! "); print(" "); print(" Type /debug to start "); print("--------------------------------------"); return 1; } public OnFilterScriptExit() { print("--------------------------------------"); print(" Script-Debug by =>Sandra<= "); print(" succesfully unloaded! "); print("--------------------------------------"); return 1; } public OnRconCommand(cmd[]) { if(strcmp(cmd, "/debug", true)==0) { TotalLines = 0; CountScriptLines(); printf("Analyzing %d lines... Please Wait...", TotalLines); for(new func; funcSandra<= |"); print("| Debug Results: |"); print("| _______________________________________________________________|"); printf("| Total Lines: %5d |", TotalLines); printf("| Total Opening brackets: %5d |", OtherFunctionCounts[1]); printf("| Total Closing brackets: %5d |", OtherFunctionCounts[2]); printf("| Total Defines: %5d |", OtherFunctionCounts[0]); if( OtherFunctionCounts[1] != OtherFunctionCounts[2]) { print("| _______________________________________________________________|"); print("| Warning: The amount of opening brackets and closing brackets |"); print("| does not match! |"); } print("| _______________________________________________________________|"); print("| |"); print("| PawnFunctions: Times Used: |"); print("|________________________________________________________________|"); for(new func; func 0) { printf(" %30s %dx",PawnFunctions[func], FunctionCounts[func]); } } print("| _______________________________________________________________|"); print("| Debugging Done! |"); print(" ________________________________________________________________"); print("\n\n\n\n"); return 1; } if(strcmp(cmd, "/searchfunction", true, 15)==0) { TotalLines = 0; CountScriptLines(); if(!strlen(cmd[14])) { print("Error: Use /findfunction [Function]"); return 1; } printf("Searching for \"%s\"... Please Wait...", cmd[16]); new entry[256], count, lines[999], newfunc[32]; new File:scriptfile = fopen("ScriptDebug.txt", io_read); if (scriptfile) { format(newfunc, 32, "%s(", cmd[16]); for(new id; id