Raised This Month: $ Target: $400
 0% 

Check if player is in screen


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
mateo10
Veteran Member
Join Date: Jan 2006
Old 11-28-2006 , 04:44   Re: Check if player is in screen
Reply With Quote #8

OK ill post my plugin now and you can tell me what's wrong:
Code:
#include <amxmodx> #include <amxmisc> #include <amxconst> #include <engine> public plugin_init() {     register_plugin("Duck When Player In Screen (DWPIS)", "1.0", "MaTTe (mateo10)")     register_cvar("dwa_enable", "1")     register_concmd("amx_dwa", "cmd_dwa", ADMIN_BAN) } public server_frame(id) {     new Float:origin[3]     new players[32], pNum     get_players(players, pNum, "a")     for(new i=0;i<pNum;i++)     {         entity_get_vector(players[i], EV_VEC_origin, origin)         if(is_in_viewcone(id, origin)         {             set_task(0.1, "do_duck", id)         } else         {             return PLUGIN_CONTINUE         }     }     return PLUGIN_CONTINUE } public cmd_dwa(id, level, cid) {     if(!get_cvar_num("dwa_enable"))         return PLUGIN_HANDLED     if(!(get_user_flags(id) & ADMIN_BAN))     {         client_print(id, print_console, "[DWA] You need access level ADMIN_BAN for this command.")         return PLUGIN_HANDLED     }     new arg[32]     read_argv(1, arg, 31)     new player     player = cmd_target(id, arg, 5)     if(!player)         return PLUGIN_HANDLED     if(is_user_bot(player))         return PLUGIN_HANDLED     new params[1]     params[0] = player     return PLUGIN_CONTINUE } public do_jump(id) {     client_cmd(id, "+jump") } public do_duck(id) {     client_cmd(id, "+duck") }
mateo10 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 06:56.


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