Raised This Month: $ Target: $400
 0% 

Dumb Question..


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
kmal2t
BANNED
Join Date: Apr 2006
Old 06-28-2007 , 00:25   Re: Dumb Question..
Reply With Quote #1

Well for one I think you need to include tsx if I'm not mistaken. Two have a multi-array with these:

enum {
TSW_GLOCK18 = 1,
TSW_UNK1,
TSW_UZI,
TSW_M3,
TSW_M4A1,
TSW_MP5SD,
TSW_MP5K,
TSW_ABERETTAS,
TSW_MK23,
TSW_AMK23,
TSW_USAS,
TSW_DEAGLE,
TSW_AK47,
TSW_57,
TSW_AUG,
TSW_AUZI,
TSW_TMP,
TSW_M82A1,
TSW_MP7,
TSW_SPAS,
TSW_GCOLTS,
TSW_GLOCK20,
TSW_UMP,
TSW_M61GRENADE,
TSW_CKNIFE,
TSW_MOSSBERG,
TSW_M16A4,
TSW_MK1,
TSW_C4,
TSW_A57,
TSW_RBULL,
TSW_M60E3,
TSW_SAWED_OFF,
TSW_KATANA,
TSW_SKNIFE,
TSW_KUNG_FU,
TSW_TKNIFE,
}

and then have something like:
new clips, extra, weapon = blah blah
ts_giveweapon(id,weapon,clips,extra )

Last edited by kmal2t; 06-28-2007 at 00:28.
kmal2t is offline
Gari
New Member
Join Date: Jun 2007
Old 06-28-2007 , 09:42   Re: Dumb Question..
Reply With Quote #2

I included TSX and I set the variables to be something but it still gives me an argument mismatch on the first variable.
Gari is offline
purple_pixie
Veteran Member
Join Date: Jun 2007
Location: Winchester, England
Old 06-28-2007 , 10:15   Re: Dumb Question..
Reply With Quote #3

It looks like you're passing in index (a string - username?) when you want id (an integer - player slot on server?)

You need a cmd_target() or find_player() first, then pass the output of that into the give_weapon function
purple_pixie is offline
Gari
New Member
Join Date: Jun 2007
Old 06-28-2007 , 10:53   Re: Dumb Question..
Reply With Quote #4

Yeah that makes sense. Looking at some other code I realized that it was player id, not name. I'll try that out and let you know how it went.
Gari 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 21:33.


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