! | Moderátori megjegyzés (kengurumancs): | Idézet: 10. AMXX, SMX fáj feltöltése szigorúan tilos. |
HipHop BoyS®™ írta: Forráskód pici része, javítva! public EventBombExploded(Handle:event, const String:name[], bool:dontBroadcast) { if(IsValidHandle(hTimer)) { CloseHandle(hTimer); } for(new i = 1; i <= GetMaxClients(); i++) { if(IsClientInGame(i) && !IsFakeClient(i) && g_c4Preferences[i][HUD]) { PrintHintText(i, "%T", "bomb exploded", i, g_planter); } } } public Action:EventBombPlanted(Handle:event, const String:name[], bool:dontBroadcast) { if(!GetConVarBool(g_CvarEnable)) { return Plugin_Continue; } g_explosionTime = GetEngineTime() + GetConVarFloat(g_CvarMPc4Timer); GetClientName(GetClientOfUserId(GetEventInt(event, "userid")), g_planter, sizeof(g_planter)); g_countdown = GetConVarInt(g_CvarMPc4Timer) - 1; hTimer = CreateTimer((g_explosionTime - float(g_countdown)) - GetEngineTime(), TimerCountdown); return Plugin_Continue; } public EventBombDefused(Handle:event, const String:name[], bool:dontBroadcast) { if(!GetConVarBool(g_CvarEnable)) { return; } if(IsValidHandle(hTimer)) { CloseHandle(hTimer); } decl String:defuser[40]; GetClientName(GetClientOfUserId(GetEventInt(event, "userid")), defuser, sizeof(defuser)); for(new i = 1; i <= GetMaxClients(); i++) { if(IsClientInGame(i) && !IsFakeClient(i) && g_c4Preferences[i][HUD]) { PrintHintText(i, "%T", "bomb defused", i, defuser); } } } public Action:TimerCountdown(Handle:timer, any:data) { BombMessage(g_countdown); if(--g_countdown) { hTimer = CreateTimer((g_explosionTime - float(g_countdown)) - GetEngineTime(), TimerCountdown); } } // Loads the soundsList array with the c4 sounds public LoadSounds() { new Handle:kvQSL = CreateKeyValues("c4SoundsList"); new String:fileQSL[PLATFORM_MAX_PATH]; BuildPath(Path_SM, fileQSL, PLATFORM_MAX_PATH, "configs/c4soundslist.cfg"); FileToKeyValues(kvQSL, fileQSL); if (!KvGotoFirstSubKey(kvQSL)) { SetFailState("configs/c4soundslist.cfg not found or not correctly structured"); CloseHandle(kvQSL); return; } for(new i = 0; i < NUM_SOUNDS; i++) { KvGetString(kvQSL, g_soundNames[i], g_soundsList[0][i], PLATFORM_MAX_PATH); } CloseHandle(kvQSL); } public PrepareSound(sound) { new String:downloadFile[PLATFORM_MAX_PATH]; if(!StrEqual(g_soundsList[0][sound], "")) { PrecacheSound(g_soundsList[0][sound], true); Format(downloadFile, PLATFORM_MAX_PATH, "sound/%s", g_soundsList[0][sound]); AddFileToDownloadsTable(downloadFile); } }
Csak én nem látom mit javítottál?
7 cvar van, de te ehhez képest, csak háromnak írtad le a jelentését.
Kód: g_CvarEnable = CreateConVar("sm_c4_timer_enable", "1", "Enables the c4 timer"); g_CvarAnnounce = CreateConVar("sm_c4_timer_announce", "1", "Announcement preferences"); g_CvarChatDefault = CreateConVar("sm_c4_timer_chat_default", "0", "Default setting for chat preference"); g_CvarCenterDefault = CreateConVar("sm_c4_timer_center_default", "0", "Default setting for center preference"); g_CvarHUDDefault = CreateConVar("sm_c4_timer_hud_default", "1", "Default setting for HUD preference"); g_CvarSoundDefault = CreateConVar("sm_c4_timer_sound_default", "1", "Default setting for sound preference"); g_CvarAltStart = CreateConVar("sm_c4_timer_start_at_ten", "0", "1 voice starts at 10, 2 text starts at 10, 3 both start at 10");
A translations fájlban lévő txt-t kérlek írj hozzá magyar nyelvet is.
! | Moderátori megjegyzés (kengurumancs): | Ez így igen sok, kuka! |
|