Raised This Month: $ Target: $400
 0% 

Command REspawn last death


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Hawk552
AMX Mod X Moderator
Join Date: Aug 2005
Old 05-20-2006 , 21:56  
Reply With Quote #4

Couple errors I noticed:

Code:
#include <amxmodx> #include <amxmisc> #include <cstrike> // 2 cells, 1 is for team T, the other is for team CT new g_iLastDead[2] public plugin_init() {     // register plugin     register_plugin("Revive Last","1.0","Hawk552")         // this is the command to revive the last dead player     register_clcmd("amx_revive_last","fnReviveLast")         // Register the death event     register_event("DeathMsg","fnEventDeathMsg","a")     // Register the events where the round ends, to make sure it's zeroed     register_logevent("fnLogEventRoundEnd",2,"1=Round_End")     register_logevent("fnLogEventRoundEnd",2,"1&Restart_Round_") } // amx_revive_last command public fnReviveLast(id) {     // get the person's team     new iTeam = get_user_team(id)     // check if anyone on the team is dead     if(g_iLastDead[iTeam-1])     {         // if so, spawn that last dead person         cs_user_spawn(g_iLastDead[iTeam - 1])                 // they aren't dead now, are they?         g_iLastDead[iTeam - 1] = 0     } } // set the last dead, when they die public fnEventDeathMsg()     g_iLastDead[get_user_team(read_data(2)) - 1] = read_data(2)     // zero out the things when round ends public fnLogEventRoundEnd() {     g_iLastDead[0] = 0     g_iLastDead[1] = 0 }
__________________
Hawk552 is offline
Send a message via AIM to Hawk552
 



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 16:18.


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