Raised This Month: $ Target: $400
 0% 

[TF2] Any idea on making a addcond plugin that reactivates if you spawn?


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
StormishJustice
Member
Join Date: May 2015
Location: In a mysterious place.
Old 02-21-2016 , 09:53   Re: [TF2] Any idea on making a addcond plugin that reactivates if you spawn?
Reply With Quote #3

Quote:
Originally Posted by nosoop View Post
Hook the player_spawn event to find out when the player spawns, then use TF2_AddCondition() to apply the effect.

If you want players to configure which condition they spawn with, then you probably want to create some sort of command like sm_spawncond, parse their desired condition, and store it in a plugin-scoped array:

Code:
TFCond g_DesiredConditions[MAXPLAYERS+1];
Oh thanks, i just did it like this but i'm not really sure because it gave me a tag mismatch on that line.
PHP Code:
public void event_PlayerSpawn(Handle event, const char[] namebool dontBroadcast)
{
    
int client GetClientOfUserId(GetEventInt(event"userid"));
    
int iCondition;
    
    
SetEntProp(clientProp_Send"m_nPlayerCond"g_DesiredConditions[client]);
    
g_DesiredConditions[client] = iCondition;

oh and i also hooked the event inside the spawncond command.
__________________
StormishJustice is offline
Send a message via AIM to StormishJustice Send a message via Yahoo to StormishJustice Send a message via Skype™ to StormishJustice
 



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


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


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