AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   Want player spawn dead (https://forums.alliedmods.net/showthread.php?t=295776)

ish12321 04-04-2017 10:38

Want player spawn dead
 
PHP Code:

rg_set_user_team(iChoice_IDTEAM_TERRORIST);
user_silentkill(iChoice_ID); 

I use this so that on new round when this set user team is executed player should be in team but not alive
but he spawns .. :\
How to fix this ?
; \

CrazY. 04-05-2017 19:38

Re: Want player spawn dead
 
Code:
#include <amxmodx> #include <cstrike> #include <hamsandwich> public plugin_init() {     register_plugin("Plugin", "1.0", "Crazy");     RegisterHam(Ham_Spawn, "player", "fw_PlayerSpawn_Post", 1); } public fw_PlayerSpawn_Post(id) {     if (!is_user_alive(id) || !cs_get_user_team(id))         return;     cs_set_user_team(id, CS_TEAM_T);     ExecuteHam(Ham_Killed, id, id, 0); }

EDIT: added more parameters into ExecuteHam to prevent log errors..

ish12321 04-06-2017 01:17

Re: Want player spawn dead
 
Thanks.

CrazY. 04-06-2017 05:32

Re: Want player spawn dead
 
No problem.


All times are GMT -4. The time now is 18:01.

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