Raised This Month: $ Target: $400
 0% 

Semiclip problems


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Enomine
Junior Member
Join Date: Apr 2012
Old 05-04-2012 , 21:57   Semiclip problems
Reply With Quote #1

I've edited the semiclip by connor, but I have some mistakes, sometimes semiclip doesn't work or players get stucked for a while... and map entitys doesn't work too u.u...

What I must do to a great work with no bugs, and how I can set 50% of transparency of the players.

Code:
#include <amxmodx> #include <engine> #include <fakemeta> /* Definition */ #define RefreshPlayersList()        get_players(iPlayers,iNum,szAliveFlags) /* Players */ new iPlayers[32]; new iNum,iPlayer,i; new const szAliveFlags[] = "a"; /* Spectator */ new isSpectating[33]; public plugin_init() {     /* Plugin Registration */     register_plugin("Semiclip", "1.0", "Enomine");         /* Forwards */     register_forward(FM_AddToFullPack, "fwdAddToFullPack", 1);     register_forward(FM_PlayerPreThink, "fwdPlayerPreThink", 1);     register_forward(FM_PlayerPostThink, "fwdPlayerPostThink", 1); } public fwdAddToFullPack(Es,E,iEnt,id,Hostflags,Player,pSet) {     if(Player && id != iEnt)     {         if(iEnt != isSpectating[id])             entity_set_int(Es, EV_INT_solid, SOLID_NOT);     } } public fwdPlayerPreThink(id) {     RefreshPlayersList();         for(i = 0;i < iNum;i++)     {         iPlayer = iPlayers[i];                 if(id != iPlayer)             entity_set_int(iPlayer, EV_INT_solid, SOLID_NOT);     }         if(!is_user_alive(id))         isSpectating[id] = entity_get_int(id, EV_INT_iuser2); } public fwdPlayerPostThink(id) {     RefreshPlayersList();         for(i = 0;i < iNum;i++)     {         iPlayer = iPlayers[i];                 if(id != iPlayer)             entity_set_int(iPlayer, EV_INT_solid, SOLID_SLIDEBOX);     }   }

sorry for my bad english.
Enomine is offline
ConnorMcLeod
Veteran Member
Join Date: Jul 2006
Location: France (95)
Old 05-05-2012 , 09:55   Re: Semiclip problems
Reply With Quote #2

In AddToFullPack you have to use set_es(Es, ES_Solid, SOLID_NOT)

Es is the entity state that is sent from server to player, it is not the real entity var value, with entity_set_int you are setting a real (server) entity variable.
__________________
- tired and retired -

- my plugins -
ConnorMcLeod is offline
Enomine
Junior Member
Join Date: Apr 2012
Old 05-07-2012 , 08:33   Re: Semiclip problems
Reply With Quote #3

Thanks!
Enomine 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 00:29.


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