Raised This Month: $ Target: $400
 0% 

drop Ent befor weapon using cmd drop ?


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
abdobiskra
Veteran Member
Join Date: Jul 2014
Location: Algeria
Old 04-13-2016 , 00:51   drop Ent befor weapon using cmd drop ?
Reply With Quote #1

Hi!
i make function when player have Ent (sword) can drop it

this function ==> register_clcmd("drop", "player_dropEnt")
this cmd ==>
register_clcmd("drop", "player_dropEnt")

here client when used this cmd "drop" ===> Ent + Weapon Droped !

but i want only Ent in first drop and weapons in next drop

how i can block drop weapon in first drop ?
__________________

Last edited by abdobiskra; 04-13-2016 at 00:52.
abdobiskra is offline
Send a message via Skype™ to abdobiskra
siriusmd99
Veteran Member
Join Date: Oct 2013
Location: Republic of Moldova
Old 04-13-2016 , 07:46   Re: drop Ent befor weapon using cmd drop ?
Reply With Quote #2

PHP Code:
public drop_ent(id){

  if(
g_has_ent[id]){
  
//if user has entity then you drop it with your code or function
//add here your code that drops entity


  
return PLUGIN_HANDLED;
  
//After your dropped entity , you block weapon drop by returning handled
 
}

return 
PLUGIN_CONTINUE;
//If player doesn't have entity, weapon drop won't be blocked

You shall have a global boolean array which checks if player has the entity :
new g_has_entity[33]

I think you understand.
siriusmd99 is offline
abdobiskra
Veteran Member
Join Date: Jul 2014
Location: Algeria
Old 04-13-2016 , 09:52   Re: drop Ent befor weapon using cmd drop ?
Reply With Quote #3

siriusmd99
yes i understand.
Thank you so much dude
__________________
abdobiskra is offline
Send a message via Skype™ to abdobiskra
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 18:38.


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