Raised This Month: $ Target: $400
 0% 

[REQ] When dead, transfer to terrorist!


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
redx6580
Senior Member
Join Date: Nov 2005
Location: New Jersey
Old 09-22-2008 , 18:57   [REQ] When dead, transfer to terrorist!
Reply With Quote #1

I need a plugin for when a Counter-Terrorist dies, the player is moved to the Terrorist team automatically. =) I have a feeling it's pretty easy, but I don't know, I don't code =D
__________________
-LJ
[img]http://img252.**************/img252/3553/sig2wq7.jpg[/img]
Karma is nothing, calm down and stop acting like it's important.
redx6580 is offline
Send a message via AIM to redx6580 Send a message via MSN to redx6580
Exolent[jNr]
Veteran Member
Join Date: Feb 2007
Location: Tennessee
Old 09-22-2008 , 19:34   Re: [REQ] When dead, transfer to terrorist!
Reply With Quote #2

Code:
#include <amxmodx> #include <amxmisc> #include <fakemeta> #define OFFSET_TEAM 114 #define fm_get_user_team(%1) get_pdata_int(%1, OFFSET_TEAM) enum {     FM_TEAM_UNASSIGNED,     FM_TEAM_T,     FM_TEAM_CT,     FM_TEAM_SPECTATOR,         FM_TEAM_MAX }; new g_msgid_TeamInfo; public plugin_init() {     register_plugin("Switch Dead CTs", "0.1", "Exolent");         register_event("DeathMsg", "EventPlayerDeath", "a");         g_msgid_TeamInfo = get_user_msgid("TeamInfo"); } public EventPlayerDeath() {     new client = read_data(2);     if( !is_user_connected(client) )     {         return;     }         if( fm_get_user_team(client) == FM_TEAM_CT )     {         fm_set_user_team(client, FM_TEAM_T);     } } fm_set_user_team(client, team) {     set_pdata_int(client, OFFSET_TEAM, team);         static const TeamInfo[FM_TEAM_MAX][] =     {         "UNASSIGNED",         "TERRORIST",         "CT",         "SPECTATOR"     };         message_begin(MSG_ALL, g_msgid_TeamInfo);     write_byte(client);     write_string(TeamInfo[team]);     message_end(); }
__________________
No private work or selling mods.
Quote:
Originally Posted by xPaw View Post
I love you exolent!
Exolent[jNr] is offline
Reply



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 23:11.


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