detect weapon and run commands
hey guys i'm having problem with this.. i want to detect the weapons of players if it has this specific weapon (example M249) and if that player has that weapon this commands will run but only on that player that has that specific weapon..and it checks that weapon after each player spawn, because my server gives weapons auto when respawn and also has resapwn, ..thanks :D
PHP Code:
and the errors are: Code:
invalid declaration or something |
Re: detect weapon and run commands
plugin_ini() is only run one at the begining of the map. You need to detect when the player spawns. See this thread and bookmark it.
Oh, and FYI, the smallest value for the first argument of set_task() is 0.1 |
Re: detect weapon and run commands
should it be like this now??
PHP Code:
PHP Code:
PHP Code:
PHP Code:
PHP Code:
|
Re: detect weapon and run commands
... You are just making up stuff.
Describe what you want to do exactly, not what you are trying to do. In other words, what is this plugin supposed to do? |
Re: detect weapon and run commands
first my server gives specific weapons to each player depends on what class you have chosen and server has respawn.. what the plugins is supposed to do is when after player spawn it will detect what are the weapons of the player and if that has a weapon(like MP5) the
PHP Code:
PHP Code:
|
Re: detect weapon and run commands
Code:
|
Re: detect weapon and run commands
should it look like this now??
PHP Code:
PHP Code:
EDIT: it now works because i included hamsandwich..thanks Exolent :D i dont know if it's working or not..and how about detecting if player has shield and runs commands if has shield or not, just like here PHP Code:
|
Re: detect weapon and run commands
Delete this:
PHP Code:
Even if you need a function like that, use user_has_weapon(). |
Re: detect weapon and run commands
how about detecting if player has shield and do the commands??
|
Re: detect weapon and run commands
|
| All times are GMT -4. The time now is 23:26. |
Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.