Help Respawn
Hello guys please help me..
I am using this plugin nice but.. this set_hudmessage(255, 155, 53, -1.0, 0.14, 0, 0.0, 0.1, 0.1, 3) show_hudmessage(0, "Respawn is disabled..") why disappears immediately? how do I get him to stay there until the hand runs out? (yandex translate) #include <amxmodx> #include <fakemeta> #include <hamsandwich> #include <cstrike> #include <engine> new Float:RoundStartTime new g_Time_Interval; const MAX_PLAYERS = 32; new g_iRespawn[MAX_PLAYERS+1], g_TeamInfoCounter[MAX_PLAYERS+1], CsTeams:g_iPlayerTeam[MAX_PLAYERS+1]; new g_pCvarRespawnTime, g_pCvarRespawnDelay, g_pCvarMaxHealth; new g_entCountDown, Float:g_flFreq, Float:g_flTimeLeft; public plugin_init() { register_plugin("DeathRun Respawn", "0.3", "Vicious Vixen"); // Edited by tvix1337 RegisterHam(Ham_Killed, "player", "fwdPlayerKilledPost", 1); RegisterHam(Ham_Spawn, "player", "fwdPlayerSpawnPost", 1); register_event("TeamInfo", "eTeamInfo", "a"); register_logevent( "LogEventRoundStart", 2, "1=Round_Start" ) g_pCvarRespawnTime = register_cvar("legendary_respawn_max", "0"); g_pCvarRespawnDelay = register_cvar("legendary_respawn_delay", "1"); g_pCvarMaxHealth = register_cvar("legendary_health_max", "100"); g_Time_Interval = register_cvar("legendary_respawn_time", "30.0"); set_msg_block( get_user_msgid( "ClCorpse" ), BLOCK_SET ); } public LogEventRoundStart() { RoundStartTime = get_gametime() new iPlayers[32] new iNum get_players( iPlayers, iNum ) for( new i = 0; i < iNum; i++ ) { g_iRespawn[iPlayers[i]] = true } MakeCountDown(get_pcvar_float(g_Time_Interval ), 0.1); } public fwdPlayerKilledPost(iVictim, iKiller, iShoudlGib) { if(g_iRespawn[iVictim]++ < get_pcvar_num(g_pCvarRespawnTime) || get_pcvar_num(g_pCvarRespawnTime) == 0) { set_task(get_pcvar_float(g_pCvarRespawnDelay) , "taskRespawnPlayer", iVictim); } return HAM_IGNORED; } public fwdPlayerSpawnPost(iClient) { if(is_user_alive(iClient)) { set_pev(iClient, pev_health, get_pcvar_float(g_pCvarMaxHealth)); } } public taskRespawnPlayer(id) { if(is_user_connected(id) && RoundStartTime + get_pcvar_float(g_Time_Interval) >= get_gametime() && g_iRespawn[id] && !is_user_alive(id) && cs_get_user_team(id) != CS_TEAM_SPECTATOR) { ExecuteHamB(Ham_CS_RoundRespawn, id) g_iRespawn[id] = false return PLUGIN_HANDLED; } return PLUGIN_HANDLED; } public eTeamInfo() { new iClient = read_data(1); new szTeam[2]; read_data(2, szTeam, charsmax(szTeam)); switch(szTeam[0]) { case 'T': { remove_task(iClient); g_iPlayerTeam[iClient] = CS_TEAM_T; } case 'C': { if(g_TeamInfoCounter[iClient] == 2 || g_iPlayerTeam[iClient] == CS_TEAM_SPECTATOR) { set_task(get_pcvar_float(g_pCvarRespawnDelay) , "taskRespawnPlayer", iClient); } g_iPlayerTeam[iClient] = CS_TEAM_CT; } case 'S': { remove_task(iClient); g_iPlayerTeam[iClient] = CS_TEAM_SPECTATOR; } } } MakeCountDown(Float:flTimeleft, Float:flFrequency = 1.0) { if( !g_entCountDown ) { g_entCountDown = create_entity( "info_target" ); new const szClass[] = "countdown"; register_think(szClass, "CountDown" ); entity_set_string(g_entCountDown, EV_SZ_classname, szClass); } g_flTimeLeft = flTimeleft; g_flFreq = flFrequency; entity_set_float(g_entCountDown, EV_FL_nextthink, get_gametime() + flFrequency); call_think(g_entCountDown); } public CountDown(iEntity) { if(iEntity != g_entCountDown) return; if (g_flTimeLeft > 0.0) { /* Ortala= -1.0, Aşağı yukarı= 0.14, Efekt= 0, 0.01, 0.1, Süre= 300.0, 3 */ set_hudmessage(255, 155, 53, -1.0, 0.14, 0, 0.0, 0.1, 0.1, 3) show_hudmessage(0, "Respawn is %.1f seconds after end.", g_flTimeLeft ) entity_set_float(g_entCountDown, EV_FL_nextthink, get_gametime() + g_flFreq) g_flTimeLeft -= g_flFreq } else { set_hudmessage(255, 155, 53, -1.0, 0.14, 0, 0.0, 0.1, 0.1, 3) show_hudmessage(0, "Respawn is disabled..") } } /* AMXX-Studio Notes - DO NOT MODIFY BELOW HERE *{\\ rtf1\\ ansi\\ deff0{\\ fonttbl{\\ f0\\ fnil Tahoma;}}\n\\ viewkind4\\ uc1\\ pard\\ lang1033\\ f0\\ fs16 \n\\ par } */ |
Re: Help Respawn
https://www.amxmodx.org/api/amxmodx/set_hudmessage
The 8th parameter is hold time in seconds(float). 20.0 = 20 seconds display time 10.0 = 10 s 7.5 = 7 and a half s |
Re: Help Respawn
why 20 seconds??? i want 600 seconds how to?
|
Re: Help Respawn
omg, just change the amount as you wish, from 20.0 to whatever
|
| All times are GMT -4. The time now is 07:31. |
Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.