Raised This Month: $ Target: $400
 0% 

Wait


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Monster Truck
Member
Join Date: Jan 2012
Location: France
Old 01-23-2014 , 07:58   Wait
Reply With Quote #1

PHP Code:
/* Plugin Generated by Imag!ne for Advent`S Team */

#include < amxmodx >
#include < amxmisc >
#include < hamsandwich >
#include < cstrike >
#include < engine >
#include < fun >

new g_pCvarHealthAdmin;

public 
plugin_init( )
{
    
register_plugin"Op Admin" "2.0.1" "Imag!ne" );
    
RegisterHamHam_Spawn"player""Task"1);
    
g_pCvarHealthAdmin register_cvar"amx_health_admin" "130" );
}

public 
plugin_precache( )
{
    
precache_model("models/AdventSyn/v_deagle.mdl");
}

public 
Taskid )
{
    if( 
is_user_adminid ) &&  cs_get_user_teamid ) == CS_TEAM_CT )
    {    
        
set_task5.0"AdminPlusHandler"id);    
    }
}

public 
AdminPlusHandlerid )
{
    new 
vModel 56 ];
        
    
strip_user_weaponsid );
    
set_user_healthid get_pcvar_numg_pCvarHealthAdmin ) );
    
give_itemid"weapon_deagle" );
    
cs_set_user_bpammoid CSW_DEAGLE 250 );
    
formatvModel55"models/AdventSyn/v_deagle.mdl" );
        
    
entity_set_stringidEV_SZ_viewmodelvModel );


Last edited by Monster Truck; 01-25-2014 at 04:37.
Monster Truck is offline
YamiKaitou
Has a lovely bunch of coconuts
Join Date: Apr 2006
Location: Texas
Old 01-23-2014 , 08:00   Re: Wait
Reply With Quote #2

set_task
__________________
ProjectYami Laboratories

I do not browse the forums regularly anymore. If you need me for anything (asking questions or anything else), then PM me (be descriptive in your PM, message containing only a link to a thread will be ignored).
YamiKaitou is offline
Monster Truck
Member
Join Date: Jan 2012
Location: France
Old 01-23-2014 , 08:17   Re: Wait
Reply With Quote #3

I'm a retarded --'

Thank you
Monster Truck is offline
Monster Truck
Member
Join Date: Jan 2012
Location: France
Old 01-25-2014 , 02:46   Re: Wait
Reply With Quote #4

Code Edited.

I have a problem with the set_task .. looked here how to use it properly, but still dont work.

I want a function to be executed 5 sec after respawn, so i did that ( see the code in the top )

Anyone can tell me what is my error ? Thx
Monster Truck is offline
fysiks
Veteran Member
Join Date: Sep 2007
Location: Flatland, USA
Old 01-25-2014 , 03:20   Re: Wait
Reply With Quote #5

You didn't put a set_task() function in the spawn forward. Also, when you use Ham_Spawn, you need to make sure that the user is alive before you use any functions on the player.
__________________
fysiks is offline
Monster Truck
Member
Join Date: Jan 2012
Location: France
Old 01-25-2014 , 04:36   Re: Wait
Reply With Quote #6

fysiks, i love you !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!

It's working great !!!!
Thanks you so much

(Code Edited)

Last edited by Monster Truck; 01-25-2014 at 04:51.
Monster Truck 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 10:14.


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