Raised This Month: $51 Target: $400
 12% 

Help needed with script


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
(NW)Shane O' D
BANNED
Join Date: Aug 2009
Location: Ireland
Old 12-23-2009 , 08:14   Help needed with script
Reply With Quote #1

hi
i am terrible at sourcepawn so i would like someone to explain how to make it so if a client types a command into console like "equip bat" it does the command "equip tf_weapon_bat"

Last edited by (NW)Shane O' D; 12-23-2009 at 15:40.
(NW)Shane O' D is offline
FaTony
Veteran Member
Join Date: Aug 2008
Old 12-24-2009 , 05:21   Re: Help needed with script
Reply With Quote #2

You may want to use trie to convert player friendly names into entity names.

Somewhere OnPluginStart:
PHP Code:
SetTrieString(yourtrie"bat""tf_weapon_bat"); 
And then in cmd body:
PHP Code:
GetCmdArg(1weapon64);
if (
GetTrieString(yourtrieweaponentity64)) {
   
entindex GivePlayerItem(cliententity);
//etc. 
FaTony 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 10:15.


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