AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   ExecuteHamB(Ham_CS_RoundRespawn, id) is not working propertly (https://forums.alliedmods.net/showthread.php?t=294420)

grs4 02-26-2017 12:52

ExecuteHamB(Ham_CS_RoundRespawn, id) is not working propertly
 
PHP Code:

    ExecuteHamB(Ham_CS_RoundRespawnid)
    
set_task(0.1"RepeatRespawn"id 51233);
    
//...
}
public 
RepeatRespawn(id)
    
ExecuteHamB(Ham_CS_RoundRespawnid 51233

Sometimes when player will respawn, he will spawn at the info_player_start, but he don't have HUD, and weapon.

http://i.imgur.com/cz4P7At.jpg

And sometimes it is working great. I tried to use once executeham too.
Or there is better way to respawn player?

edit:
amxx version
Quote:

AMX Mod X 1.8.3-dev+5095
Authors:
David "BAILOPAN" Anderson, Pavol "PM OnoTo" Marko, Felix "SniperBeamer" Geyer
Jonny "Got His Gun" Bergstrom, Lukasz "SidLuke" Wlasinski
Christian "Basic-Master" Hammacher, Borja "faluco" Ferrer
Scott "DS" Ehlert
Compiled: Feb 23 2017, 04:28:22
URL:http://www.amxmodx.org/

edon1337 02-26-2017 13:07

Re: ExecuteHamB(Ham_CS_RoundRespawn, id) is not working propertly
 
That's definitely not Hamsandwich's problem.

OciXCrom 02-26-2017 13:10

Re: ExecuteHamB(Ham_CS_RoundRespawn, id) is not working propertly
 
Is there a reason to respawn him twice?

grs4 02-26-2017 13:27

Re: ExecuteHamB(Ham_CS_RoundRespawn, id) is not working propertly
 
Quote:

Originally Posted by OciXCrom (Post 2498814)
Is there a reason to respawn him twice?

I just checked twice respawn. But even one time is not working propertly.

georgik57 02-26-2017 13:33

Re: ExecuteHamB(Ham_CS_RoundRespawn, id) is not working propertly
 
That's because you have to wait for him to join a team or force him to do it first.
Best done via engclient_cmd(iID, "jointeam 5; joinclass 5").
Otherwise, he's still (partially) a spectator. That's why he has no HUD.

grs4 02-26-2017 14:47

Re: ExecuteHamB(Ham_CS_RoundRespawn, id) is not working propertly
 
Quote:

Originally Posted by georgik57 (Post 2498829)
That's because you have to wait for him to join a team or force him to do it first.
Best done via engclient_cmd(iID, "jointeam 5; joinclass 5").
Otherwise, he's still (partially) a spectator. That's why he has no HUD.

I know with "you have to wait for him to join a team or force him to do it first." .

I setted team first with
PHP Code:

cs_set_user_team(idCS_TEAM_TCS_DONTCHANGE); 

and every 5 seconds one task is respawning all not alive players.

Depresie 02-27-2017 16:10

Re: ExecuteHamB(Ham_CS_RoundRespawn, id) is not working propertly
 
the problem is that you use cs_set_user_team native
cs_set_user_team native should only be used after the player selected a team, otherwise it will bug out...

PHP Code:

engclient_cmd(iID"jointeam 5; joinclass 5"



All times are GMT -4. The time now is 21:02.

Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.