About Code
This code is form Hide_N_Seek.sma.
Code:
public fwdTouchWeapon( iEntity, id )Code:
if( !g_bAlive[ id ] || get_pcvar_num( g_pPickup ) )So the player not alive , it will go next. why use get_pcvar_num( g_pPickup ) ? |
Re: About Code
|| represents OR
So if either condition is met. As opposed to && which represents AND. So both conditions would need to be met. |
Re: About Code
Quote:
If the player is dead (not alive) or the cvar pickup is true then let the hook call normally. Otherwise, block (supercede) touch. |
Re: About Code
Quote:
Code:
|
Re: About Code
Quote:
|
Re: About Code
Quote:
|
Re: About Code
Quote:
get_pcvar_num( g_pPickup ) is the value of a cvar for, I'm assuming, if a user is able to pickup weapons. |
Re: About Code
Quote:
If the player is alive and the cvar is equal to 0. How it will be? Can the player pick up weapon ? File Link: http://forums.alliedmods.net/showthread.php?p=643707 |
Re: About Code
Because, if he is dead then he cannot pickup a weapon so the plugin allows the game engine to handle it.
If he is alive and cvar is 0 then the plugin blocks him from picking up the weapon. |
Re: About Code
Quote:
Why don't use Code:
if(get_pcvar_num( g_pPickup)) |
| All times are GMT -4. The time now is 09:28. |
Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.