AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   t drop knife help! (https://forums.alliedmods.net/showthread.php?t=62039)

Achtung 10-17-2007 10:01

t drop knife help!
 
i woundering if someone can code a plugin. The meaning is that terrorist will drop its knife every round. Plz help me :)

M249-M4A1 10-17-2007 18:21

Re: t drop knife help!
 
This should be in Suggestions/Requests

EDIT: You cannot "drop" a knife unless you were to block the knife entirely and spawn a knife model near the player.

Achtung 10-18-2007 00:56

Re: t drop knife help!
 
ok i want to block the knife in Terrorist. Does that plugin exists `?

M249-M4A1 10-18-2007 16:41

Re: t drop knife help!
 
1 Attachment(s)
Probably not the best way to do it... but...

Achtung 10-19-2007 02:44

Re: t drop knife help!
 
thank you M249-M4A1 ! i will test as soon as possible

M249-M4A1 10-19-2007 13:05

Re: t drop knife help!
 
It's supposed to give your glock back

ConnorMcLeod 10-19-2007 13:35

Re: t drop knife help!
 
I've tested this :
Code:
#include <amxmodx> #include <fakemeta> new const T_SPAWN_CLASSNAME[] = "info_player_deathmatch" //new const CT_SPAWN_CLASSNAME[] = "info_player_start" public plugin_init() {     register_plugin("No Terro Knives","0.1","connor")     register_forward(FM_SetModel, "fwd_SetModel") } public fwd_SetModel(ent, const model[]) {     if(!pev_valid(ent))         return FMRES_IGNORED     if( !equal(model, "models/w_knife.mdl") )         return FMRES_IGNORED     static Float:origin[3]     pev(ent, pev_origin, origin)     if( check_terrorist(origin) )     {         engfunc(EngFunc_RemoveEntity, ent)         return FMRES_SUPERCEDE     }     return FMRES_IGNORED } check_terrorist(Float:origin[]){     new ent     while((ent = engfunc(EngFunc_FindEntityInSphere, ent, origin, 50.0)) != 0 ) {         static classname[33]         pev(ent, pev_classname, classname, charsmax(classname))         if(equal(classname,T_SPAWN_CLASSNAME))             return 1     }     return 0 }

Tested on my listenserver and worked, but as soon as i've added a bot, server crashed.


All times are GMT -4. The time now is 01:16.

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