Raised This Month: $ Target: $400
 0% 

help with some dr vip plugin


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Black Rose
Veteran Member
Join Date: Feb 2011
Location: Stockholm, Sweden
Old 08-12-2013 , 11:29   Re: help with some dr vip plugin
Reply With Quote #1

This fixes the precache issue in the most easy way:
Code:
public plugin_precache() {     precache_model(VIP_MODEL)     precache_sound(VIP_CONNECT)     precache_sound(MENU_POPUP)     precache_sound(MENU_OK)     gCylinderSprite = precache_model( "sprites/shockwave.spr" ); }

You have 2 DeathMsg hooks that you can combine.

First you remove this:
Code:
public Hook_Deathmessage(id) {     new killer = read_data( 1 );     new victim = read_data( 2 );     if( killer == victim )     {         return PLUGIN_HANDLED;     }             HasSpeed[ victim ] = false;         set_user_maxspeed( victim, 0.0 );     if(RandomFunction[id] == 2)     {         set_user_godmode(id, 1)     }     return PLUGIN_CONTINUE; }
and this
Code:
register_event( "DeathMsg", "Hook_Deathmessage", "a" );

And then you edit event_deathmsg() to this:
Code:
public event_deathmsg() {     new victim = read_data(2)     new killer = read_data(1)         if ( ! is_user_connected(victim) )         return      if((get_user_flags(victim) & FLAG) && (get_pcvar_num(cvar_deathpoints) == 1))     {         cs_set_user_deaths(victim, -1)     }     if(is_user_connected(killer) && get_pcvar_num(cvar_freeviptry) == 1)     {         if((get_user_team(killer) == 2) && (get_user_team(victim) == 1) && !(get_user_flags(killer) & FLAG))         {             VipPoints[killer] += 1;         }     }         HasSpeed[ victim ] = false;         set_user_maxspeed( victim, 0.0 );     if(RandomFunction[killer/*?*/] == 2)     {         set_user_godmode(killer/*?*/, 1)     } }

Come back if you have further errors
__________________
Black Rose 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 15:45.


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