Raised This Month: $ Target: $400
 0% 

Error with .tga


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Author Message
Stereo
Veteran Member
Join Date: Dec 2010
Old 08-08-2011 , 22:08   Error with .tga
Reply With Quote #1

Hello alliedmodders.

This time I have tried to do a plugin with the one that shows you an image .tga but when I write /tga the server shutting down:

Fatal Error


Code:
PHP Code:
#define PLUGIN  "Mostrando_TGA"
#define VERSION "1.0"
#define AUTHOR  "iG_os"

#include <amxmodx>

#define SVC_DIRECTOR 51  // come from util.h
#define DRC_CMD_BANNER 9 // come from hltv.h


#define TGASUM 1
#define is_valid_player(%1) (1 <= %1 <= 32)

new szTga[TGASUM][] ={ "gfx/monsterstereo.tga" }

new 
bool:Tga[33];

public 
plugin_init()
{
    
register_plugin(PLUGINVERSIONAUTHOR)
    
register_clcmd("say /tga""mostrar_tga")
    
register_clcmd("say /notga""nomostrar_tga")
}
public 
plugin_precache()
{
    for (new 
i=0i<TGASUMi++)
        
precache_generic(szTga[i])
}

public 
nomostrar_tga(idTga[id] = false;

public 
mostrar_tga(id)
{
    
Tga[id] = true;
    if(
is_valid_player(id) && is_user_connected(id) && Tga[id]) {
        new 
index 1
        message_begin
MSG_ONESVC_DIRECTOR_id )
        
write_bytestrlenszTga[index]) + // command length in bytes
        
write_byteDRC_CMD_BANNER )
        
write_stringszTga[index] ) // banner file
        
message_end()
    }
}

public 
client_putinserver(idTga[id] = false;
public 
client_disconnect(idTga[id] = false
Attached Thumbnails
Click image for larger version

Name:	Fatal_Error.jpg
Views:	185
Size:	78.9 KB
ID:	90285  

Last edited by Stereo; 08-09-2011 at 06:31.
Stereo is offline
 



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 03:21.


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