AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   Creating "fake" players (https://forums.alliedmods.net/showthread.php?t=9206)

BlueRaja 01-09-2005 11:14

Creating "fake" players
 
This topic regards being able to see the other team on the radar:
As I've mentioned before, you can only use the Radar message (in CS, at least) to show the origin of a player if cs_get_user_team(id)==cs_get_user_team(enemyi d), and both players are living. However...
I've seen plugins where fake spectators are created to fill in slots. I haven't had time to look at these to see how it's done, but I was wondering if it would be possible to internally "fake" that these fake players are on a team (without having them show up on the scoreboard). That is, trick the server into thinking the fake players are real players, alive and on a team, just without..uh..models/guns/an origin/anything else.
That way, I could create a bunch of fake players and set so many up on each team, and send the id of the FAKE players using the Radar message -- then, players would be able to authentically see the enemy on their radar..although both enemies and friendlies would be the same color on the radar...maybe I'd set it up as a button they could bind, or something. Also, I'd have to think of a way of "killing" all the fake players, if necessary, whenever all the real players are killed; otherwise, the server would think that there are still players alive on a team, when in reality there aren't. Finally, I believe this would only work on 16-player servers, since there can only be 32 players, real or fake, to a server, and I'd need one fake player to every real player.
Although it would have its limitations, so does my last radar plugin.
Is there any way to implement this? O_o

twistedeuphoria 01-09-2005 12:52

How about doing something like creating a fake player that's invisible with no clip? Or even better if you could fake a hostie it might follow them around for you :) .

BlueRaja 01-09-2005 15:35

........
ok, anyways...
can anyone offer any *real* help? O_o

XxAvalanchexX 01-09-2005 16:15

It might work, but I don't know if you could stop them from being on the scoreboard.

From fakemeta_const.inc:

Code:
EngFunc_CreateFakeClient,   // edict)       (const char *netname);  // returns NULL if fake client can't be created

Although I haven't used the engfunc() function before, I believe it would work like this:

Code:
new fake_player_id = engfunc(EngFunc_CreateFakeClient,"Name of player here");

Geesu 01-10-2005 08:17

then just set the origin to be like 96 units above the player where you want the radar to appear.

XxAvalanchexX 01-10-2005 15:20

You will also want them to be invisible, non-solid, and invincible.

Twilight Suzuka 01-10-2005 16:43

Or just set them to noclip, since thats all of the above.

TotalNoobScripter 01-10-2005 17:59

noclip = invincible?

...godmode.

mindping 02-21-2005 12:00

noclip = you cant walk thru it

not godmode

BlueRaja 02-21-2005 16:41

Wow, that's exactly what he just said.


All times are GMT -4. The time now is 19:17.

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