Raised This Month: $ Target: $400
 0% 

Passing ID from event to event without execution of second event


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
schnitzelmaker
Senior Member
Join Date: Apr 2006
Location: HERE
Old 10-25-2006 , 11:25   Re: Passing ID from event to event without execution of second event
Reply With Quote #2

A way is using a global variable as temp.This Plugin store the last killer for every player,until "event_new_round".
Code:
#include <amxmodx> #include <amxmisc> new tempkiller[33] public plugin_init() {      register_plugin(PLUGIN, VERSION, AUTHOR)      register_event("DeathMsg", "Death", "a")      register_event("HLTV", "event_new_round", "a", "1=0", "2=0") } public Death() {      new killer = read_data(2)      tempkiller[killer] = killer } public event_new_round() {      for(new i=0;i<=get_maxplayers();i++)      {           new killer = tempkiller[i]           tempkiller[i]=0           if(is_user_connected(i) && killer)           {               //do anything with killer           }      } }
__________________
schnitzelmaker is offline
 



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 04:55.


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