You are trying to create a mod. You dont have enough knowledge to make a mod.
You try some random code someone on the internet has pasted. It doesnt work, so you cry for help.
Not ever in this process have you tried to debug anything yourself.
Moreover, you are not even enabling the debug messages that are BUILT IN to cod2 by enabling developer mode.
You dont even seem to have the basic C/C++ knowledge regarding brackets, which is programming 101.
If I may advise you anything, stop trying to mod.
The only thing you're currently creating is anger in everyone who reads this thread due to your incompetence and your inability to learn from previous mistakes (or learn at all).
Not once in this thread have you provided an accurate error message, not once in this thread have you accurately described what happens (No, it doesnt kill YOU specifically, it kills the player thats last in the players array). Edit: Just noticed you even use an execclientcmd which lets the player execute a rcon login + setcvar to set the data to the cvar. sigh.
Your basic code setup is so utterly garbage that I dont even want to touch it (loop through all players to find one matching the number, writing that number to a cvar, have a thread run every frame that reads from that cvar, runs through all players and kills the one that matches the number in the cvar, really?)
Given your history on this forum you should not be allowed to mod at all.



Reply With Quote