Raised This Month: $ Target: $400
 0% 

Using prethink.. need some help!


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Author Message
HLM
Senior Member
Join Date: Apr 2008
Location: C:\WINDOWS\System32
Old 06-30-2009 , 21:42   Using prethink.. need some help!
Reply With Quote #1

okay.. ive been working on a plugin.. tried doing it with the knowledge of PAST HANDWALKING ONLY!

it failed so now, im here again.. please, someone tell me wich way to go please..

PHP Code:
/* Script generated by Pawn Studio */

#include <amxmodx>
#include <amxmisc>
#include <fun>
#include <tfcx>
#include <engine>

#define PLUGIN    "Spy Cloak"
#define AUTHOR    "HLM"
#define VERSION    "0.5 Beta"

new float:lasttime[33]

public 
plugin_init()
{
    
register_plugin(PLUGINVERSIONAUTHOR)
}
public 
client_PreThink(id)
{
    
    while (
lasttime[id] < get_systime) do lasttime[id] = get_systime 3
    
    
    
new name[33]
    
get_user_name(id,name,32)
    
    
    
log_amx("loaded ham_spy_cloak for %s",name)
    
    new class = 
entity_get_int(idEV_INT_playerclass)
    
log_amx("%s is class %i",name,class)
    
    if(class == 
8)        
    {
        
log_amx("does class == 8?")
        
        
set_user_rendering(id,kRenderFxNone,_,_,_,kRenderTransAlpha,128)
        
log_amx("%s was cloaked!",name)
        
client_print(id,print_chat,"%s, as a spy you have a visibility cloak!",name)
        
        new 
weapon get_user_weapon(id)
        if(
weapon == TFC_WPN_KNIFE)
        {
            
set_user_rendering(id,kRenderFxFlickerSlow,_,_,_,kRenderTransAlpha,85)
            
log_amx("%s is holding a knife!",name)
            
client_print(id,print_chat,"[AMXX] %s, The knife is making the cloak work better!",name)
        }
    }
    
log_amx("ham_spy_cloaked done loading for %s...",name)
    return 
PLUGIN_HANDLED

Code:
//// SpyCloak.sma
// C:\Program Files\AMX Mod X\files\base\scripting\SpyCloak.sma(22) : error 076:
 syntax error in the expression, or invalid function call
// C:\Program Files\AMX Mod X\files\base\scripting\SpyCloak.sma(22) : error 076:
 syntax error in the expression, or invalid function call
// C:\Program Files\AMX Mod X\files\base\scripting\SpyCloak.sma(22 -- 25) : warn
ing 213: tag mismatch
// C:\Program Files\AMX Mod X\files\base\scripting\SpyCloak.sma(25) : error 001:
 expected token: "while", but found "new"
// C:\Program Files\AMX Mod X\files\base\scripting\SpyCloak.sma(25) : fatal erro
r 107: too many error messages on one line
__________________
+|- KARMA Respectively


Last edited by HLM; 07-01-2009 at 04:39.
HLM is offline
 


Thread Tools
Display Modes

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 15:39.


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