Raised This Month: $ Target: $400
 0% 

awp2scout problems with new version


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
jsterling
SourceMod Donor
Join Date: Mar 2004
Location: Denver, CO, USA
Old 03-11-2005 , 00:59   awp2scout problems with new version
Reply With Quote #1

Ok, so I recieved some help modding this script for amxx a long while ago and with the newest update when a user picks up an awp the server crashes ...
Any help would be appreciated. Thanks.

Here is the current code

Code:
/* AMXX Mod script. * * This file is provided as is (no warranties). * A better awp restriction for cs (this works for 1.6) * This plugin changes a players awp to a scout. * It basically burries the player 2000 units down, drops the awp, * gives a scout/ammo and puts them back. * * Version: * 0.2 - Updated for AMXX *   - Code shortened and cleaned * * Install: * --------------- * Add to your awp2scout.amx to your plugins.ini and add the amx_awp2scout cvar to your amxx.cfg * * COMMANDS: * --------------- * amx_awp2scout (1|0) 1= On 0= Off */ #include <amxmodx> #include <amxmisc> #include <fun> public check_awp(id) {     if (get_cvar_num("amx_awp2scout")!=1)     {     return PLUGIN_CONTINUE     }else{     new parm[1]     parm[0] = id            set_task(0.1, "drop_awp", id, parm, 1)     }         return PLUGIN_CONTINUE } public drop_awp (parm[]) {     new id = parm[0]     new origin[3]     get_user_origin(id, origin, 0)     origin[2] -= 2000     set_user_origin(id, origin)     engclient_cmd(id, "drop", "weapon_awp")     give_item(id, "weapon_scout")     give_item(id, "ammo_762nato")     origin[2] += 2005     set_user_origin(id, origin) } public plugin_init() {       register_plugin("Awp2Scout", "0.2", "[-3LH-]Geezus")       register_event("WeapPickup", "check_awp", "b","1=18")       register_cvar("amx_awp2scout", "1")       return PLUGIN_CONTINUE }
jsterling is offline
Send a message via AIM to jsterling
TotalNoobScripter
Senior Member
Join Date: Aug 2004
Old 03-11-2005 , 20:26  
Reply With Quote #2

try client_cmd instead of engclient_cmd. I never used engclient_cmd before so i dont know how its different then client_cmd.
TotalNoobScripter is offline
Send a message via AIM to TotalNoobScripter
XxAvalanchexX
Veteran Member
Join Date: Oct 2004
Location: abort73.com
Old 03-11-2005 , 21:06  
Reply With Quote #3

Not sure that engclient_cmd has three parameters. Also, you subtract 2000 and then add 2005, so this will end up messing them up in the long run. :-p Try this:

Code:
/* AMXX Mod script. * * This file is provided as is (no warranties). * A better awp restriction for cs (this works for 1.6) * This plugin changes a players awp to a scout. * It basically burries the player 2000 units down, drops the awp, * gives a scout/ammo and puts them back. * * Version: * 0.2 - Updated for AMXX *    - Code shortened and cleaned * * Install: * --------------- * Add to your awp2scout.amx to your plugins.ini and add the amx_awp2scout cvar to your amxx.cfg * * COMMANDS: * --------------- * amx_awp2scout (1|0) 1= On 0= Off */ #include <amxmodx> #include <amxmisc> #include <fun> public check_awp(id) {     if (get_cvar_num("amx_awp2scout")!=1)     {     return PLUGIN_CONTINUE     }else{     new parm[1]     parm[0] = id             set_task(0.1, "drop_awp", id, parm, 1)     }         return PLUGIN_CONTINUE } public drop_awp (parm[]) {     new id = parm[0]     new origin[3]     get_user_origin(id, origin, 0)     origin[2] -= 2000     set_user_origin(id, origin)     engclient_cmd(id, "drop weapon_awp")     give_item(id, "weapon_scout")     give_item(id, "ammo_762nato")     origin[2] += 2000     set_user_origin(id, origin) } public plugin_init() {       register_plugin("Awp2Scout", "0.2", "[-3LH-]Geezus")       register_event("WeapPickup", "check_awp", "b","1=18")       register_cvar("amx_awp2scout", "1")       return PLUGIN_CONTINUE }
__________________
No longer around. Thanks your support, everyone! As always:
THIS ONES FOR YOU
3000 PTS
XxAvalanchexX is offline
TotalNoobScripter
Senior Member
Join Date: Aug 2004
Old 03-11-2005 , 21:07  
Reply With Quote #4

roffle i diddnt see the +2005
TotalNoobScripter is offline
Send a message via AIM to TotalNoobScripter
jsterling
SourceMod Donor
Join Date: Mar 2004
Location: Denver, CO, USA
Old 03-12-2005 , 14:23  
Reply With Quote #5

Ok, the script above works fine ...

Just as an FYI. The problem was an error in the amxmodx_mm.dll that was causing issues with metamod-p. They have released a patch and all works again. Is there any other optimizations anyone can help with? Thanks.
jsterling is offline
Send a message via AIM to jsterling
jsterling
SourceMod Donor
Join Date: Mar 2004
Location: Denver, CO, USA
Old 03-16-2005 , 16:58  
Reply With Quote #6

Ok, so I was wrong. It still wont work with the metamod-p patch but works fine with 1.17.4. Any other ideas? Thanks.
jsterling is offline
Send a message via AIM to jsterling
Johnny got his gun
Veteran Member
Join Date: Jan 2004
Location: Tokyo
Old 03-16-2005 , 17:17  
Reply With Quote #7

Code:
/* This is an emulation of a client command (commands aren't send to client!). * It allows to execute some commands on players and bots. * Function is excellent for forcing to do an action related to a game (not settings!). * The command must stand alone but in arguments you can use spaces. */ native engclient_cmd(index,const command[],arg1[]="",arg2[]="");
Johnny got his gun is offline
XxAvalanchexX
Veteran Member
Join Date: Oct 2004
Location: abort73.com
Old 03-16-2005 , 22:12  
Reply With Quote #8

Okay, so I was wrong. Don't do what I say!









Go jump off a bridge. Please.
__________________
No longer around. Thanks your support, everyone! As always:
THIS ONES FOR YOU
3000 PTS
XxAvalanchexX 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 14:14.


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