Raised This Month: $ Target: $400
 0% 

How to prevent item pickup


Post New Thread Reply   
 
Thread Tools Display Modes
Alienmario
Senior Member
Join Date: Aug 2013
Old 08-06-2014 , 17:16   Re: How to prevent item pickup
Reply With Quote #11

If someone comes looking for this like I did, here's my working solution.
PHP Code:
public OnEntityCreated(entity, const String:classname[]){
    if(!
StrContains(classname"item_")){
        
//SDKHook(entity, SDKHook_SetTransmit, SetTransmitItems); //uncomment to hide items
        
SDKHook(entitySDKHook_TouchStartTouch);
    }
}

public 
Action:SetTransmitItems(entclient){
    if(
ClientsThatCantPickUpItems[client]) return Plugin_Handled;
    return 
Plugin_Continue;
}

public 
Action:StartTouch(entother){
    if(
other<=MAXPLAYERS && ClientsThatCantPickUpItems[other])  return Plugin_Handled;
    return 
Plugin_Continue;


Last edited by Alienmario; 08-06-2014 at 20:03. Reason: player check
Alienmario 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 06:44.


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