Raised This Month: $ Target: $400
 0% 

TS 2.1 - Dropping gun, Deleting it, Giving Another


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
mysticssjgoku4
Veteran Member
Join Date: Jan 2005
Location: Chicago Heights, IL
Old 07-04-2007 , 15:25   TS 2.1 - Dropping gun, Deleting it, Giving Another
Reply With Quote #1

Shouldn't this work?....cuz it doesn't :S
Code:
public player_replace_weapon(id,gunid,ammo,clips,extras) {     client_cmd(id,"weapon_%i;wait;drop",gunid)         new Float:origin[3]     pev(id,pev_origin,origin)     new ent = 0, Float:radius = 64.0, classname[32]     while((ent = find_ent_in_sphere(ent,origin,radius)) != 0)     {         pev(ent,pev_classname,classname,31)         client_print(id,print_chat,"Class: %s",classname)         if(equali(classname,"weapon_tsgun"))         {             remove_entity(ent)         }     }     ts_giveweapon(id,gunid,clips,extras)     //ts_set_weapon_ammo(id,gunid,ammo)     return PLUGIN_HANDLED }

Doesn't give me a new gun, Drop the Old gun, and Doesn't delete it.... :-\...

Any ideas anyone?

Thanks
__________________

mysticssjgoku4 is offline
Send a message via AIM to mysticssjgoku4 Send a message via MSN to mysticssjgoku4
Greenberet
AMX Mod X Beta Tester
Join Date: Apr 2004
Location: Vienna
Old 07-04-2007 , 15:28   Re: TS 2.1 - Dropping gun, Deleting it, Giving Another
Reply With Quote #2

well i havn't coded much in ts yet but shouldnt it be weapon_%s and gunid an string?
__________________
Greenberet is offline
Send a message via ICQ to Greenberet Send a message via MSN to Greenberet
mysticssjgoku4
Veteran Member
Join Date: Jan 2005
Location: Chicago Heights, IL
Old 07-04-2007 , 15:29   Re: TS 2.1 - Dropping gun, Deleting it, Giving Another
Reply With Quote #3

Oh, it drops the gun, and the id should be an integer for these functions anyhow... lol.
Doesn't give the new gun or deletes it...

And now...it crashes my server..
__________________


Last edited by mysticssjgoku4; 07-04-2007 at 15:33.
mysticssjgoku4 is offline
Send a message via AIM to mysticssjgoku4 Send a message via MSN to mysticssjgoku4
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 21:33.


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