Raised This Month: $ Target: $400
 0% 

Sprites in Maps


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Schnuffer
Junior Member
Join Date: Sep 2004
Location: Leipzig, Germany
Old 12-27-2004 , 14:15   Sprites in Maps
Reply With Quote #1

Kann mir mal einer bitte den code vervollständigen? Es soll damit ein Logo in die Maps gemacht werden.

Code:
#include <amxmodx> #include <engine> new map_cors_origin[3] new map_cors_pre public plugin_init(){     register_plugin("Logo", "0.1", "KriegsGeBiet")     map_cors_pre = map_cors_present(map_cors_origin)     logo()     return PLUGIN_CONTINUE } public logo(){     if ( map_cors_pre ){                new iEnt = create_entity( "env_sprite" )                entity_set_model( iEnt, "sprites/logo.spr" )         entity_set_origin( iEnt, map_cors_origin )                         DispatchSpawn( iEnt )     }       } map_cors_present(maporigin[3]){     if (file_exists("addons/amxmodx/configs/logo.cfg")){         new readdata[64]         new currentmap[32]         get_mapname(currentmap,31)         new map[32],x[16],y[16],z[16], len         for(new i=0; i < 100 && read_file("addons/amxmodx/configs/logo.cfg",i,readdata,63,len); i++) {             parse(readdata,map,31,x,15,y,15,z,15)             if(equal(map,currentmap)){                 maporigin[0] = str_to_num(x)                 maporigin[1] = str_to_num(y)                 maporigin[2] = str_to_num(z)                 return 1             }         }       }                   return 0 } public plugin_precache()     precache_model("sprites/logo.spr")
__________________
IRC: #kriegsgebiet @ QuakeNet
Schnuffer is offline
Send a message via ICQ to Schnuffer
doomy
Member
Join Date: Jul 2004
Location: Plano, Texas
Old 12-27-2004 , 15:04  
Reply With Quote #2

Ok i think i understand wat ur saying...sorry i dont speak German, and googles translator sux. This is wat i think u want:

Code:
#include <amxmodx> #include <engine> new map_cors_origin[3], map_cors_pre, logo public plugin_init(){     register_plugin("Logo", "0.1", "KriegsGeBiet")     map_cors_pre = map_cors_present(map_cors_origin)     logo()     return PLUGIN_CONTINUE } public logo(){     if ( map_cors_pre ){         message_begin( MSG_BROADCAST, SVC_TEMPENTITY, map_cors_origin )         write_coord( map_cors_origin[0] )         write_coord( map_cors_origin[1] )         write_coord( map_cors_origin[2] )         write_short( logo )         write_byte( 10 ) //Normal size         message_end()     }         } map_cors_present(maporigin[3]){     if (file_exists("addons/amxmodx/configs/logo.cfg")){         new readdata[64]         new currentmap[32]         get_mapname(currentmap,31)         new map[32],x[16],y[16],z[16], len         for(new i=0; i < 100 && read_file("addons/amxmodx/configs/logo.cfg",i,readdata,63,len); i++) {             parse(readdata,map,31,x,15,y,15,z,15)             if(equal(map,currentmap)){                 maporigin[0] = str_to_num(x)                 maporigin[1] = str_to_num(y)                 maporigin[2] = str_to_num(z)                 return 1             }         }         }                     return 0 } public plugin_precache()     logo = precache_model("sprites/logo.spr")
__________________
Life is a twisted irony filled with things we can not explain. That's why we are here--to define your world!
doomy is offline
Schnuffer
Junior Member
Join Date: Sep 2004
Location: Leipzig, Germany
Old 12-27-2004 , 15:40  
Reply With Quote #3

THX doomy

The code does not function in such a way. I wanted the sprite without temp entity set it purely otherwise each round again disappear there.

Someone has another idea?

Sry 4 my bad Englich.
__________________
IRC: #kriegsgebiet @ QuakeNet
Schnuffer is offline
Send a message via ICQ to Schnuffer
doomy
Member
Join Date: Jul 2004
Location: Plano, Texas
Old 12-27-2004 , 18:02  
Reply With Quote #4

Okay, I updated the code so that as each new round starts the sprite will be displayed again. Here you go:

Code:
#include <amxmodx> #include <engine> new map_cors_origin[3] new map_cors_pre public plugin_init(){     register_plugin("Logo", "0.1", "KriegsGeBiet")     map_cors_pre = map_cors_present(map_cors_origin)     register_event("ResetHUD","logo")     logo()     return PLUGIN_CONTINUE } public logo(){     if ( map_cors_pre ){                 new iEnt = create_entity( "env_sprite" )                 entity_set_model( iEnt, "sprites/logo.spr" )         entity_set_origin( iEnt, map_cors_origin )                           DispatchSpawn( iEnt )     }         } map_cors_present(maporigin[3]){     if (file_exists("addons/amxmodx/configs/logo.cfg")){         new readdata[64]         new currentmap[32]         get_mapname(currentmap,31)         new map[32],x[16],y[16],z[16], len         for(new i=0; i < 100 && read_file("addons/amxmodx/configs/logo.cfg",i,readdata,63,len); i++) {             parse(readdata,map,31,x,15,y,15,z,15)             if(equal(map,currentmap)){                 maporigin[0] = str_to_num(x)                 maporigin[1] = str_to_num(y)                 maporigin[2] = str_to_num(z)                 return 1             }         }         }                     return 0 } public plugin_precache()     precache_model("sprites/logo.spr")
__________________
Life is a twisted irony filled with things we can not explain. That's why we are here--to define your world!
doomy is offline
Schnuffer
Junior Member
Join Date: Sep 2004
Location: Leipzig, Germany
Old 12-27-2004 , 18:43  
Reply With Quote #5

not work

Here is a new Code.
I do not have notion like one the x y z data hand over. Perhaps points you it.

Code:
#include <amxmodx> #include <engine> public plugin_init(){     register_plugin("Logo", "0.1", "KriegsGeBiet")     logo()     return PLUGIN_CONTINUE } public logo(){     if (file_exists("addons/amxmodx/configs/logo.cfg")){         new readdata[64]         new currentmap[32]         get_mapname(currentmap,31)         new map[32],x[16],y[16],z[16], len         for(new i=0; i < 100 && read_file("addons/amxmodx/configs/logo.cfg",i,readdata,63,len); i++) {             parse(readdata,map,31,x,15,y,15,z,15)             if(equal(map,currentmap)){                 new Float:origin[3]                 origin[0] = Float:str_to_num(x)                 origin[1] = Float:str_to_num(y)                 origin[2] = Float:str_to_num(z)                                 // DEBUG                 server_print("X: %d, Y: %d, Z: %d", origin[0], origin[1], origin[2])                                 new iEnt = create_entity( "env_sprite" )                        entity_set_model( iEnt, "sprites/logo.spr" )                         entity_set_origin( iEnt, origin )                                 DispatchSpawn( iEnt )               }         }       }               } public plugin_precache()     precache_model("sprites/logo.spr")

DEBUG works fine. The data agree
__________________
IRC: #kriegsgebiet @ QuakeNet
Schnuffer is offline
Send a message via ICQ to Schnuffer
doomy
Member
Join Date: Jul 2004
Location: Plano, Texas
Old 12-27-2004 , 23:59  
Reply With Quote #6

ok one problem is that i dont have a config file for it. If you could possibly tell me wats happening i mit be able to figure out the problem. That would really help, thanks.
__________________
Life is a twisted irony filled with things we can not explain. That's why we are here--to define your world!
doomy is offline
Schnuffer
Junior Member
Join Date: Sep 2004
Location: Leipzig, Germany
Old 12-28-2004 , 00:41  
Reply With Quote #7

Here is the logo.sma RENAME it to logo.cfg

de_dust2 -> LOGO on T Base
cs_italy -> LOGO on CT Base

The URL from the logo.spr was send per PM to you.
Attached Files
File Type: sma Get Plugin or Get Source (logo.sma - 193 views - 48 Bytes)
__________________
IRC: #kriegsgebiet @ QuakeNet
Schnuffer is offline
Send a message via ICQ to Schnuffer
Schnuffer
Junior Member
Join Date: Sep 2004
Location: Leipzig, Germany
Old 12-28-2004 , 16:39  
Reply With Quote #8

Nobody can help me?
__________________
IRC: #kriegsgebiet @ QuakeNet
Schnuffer is offline
Send a message via ICQ to Schnuffer
LynX
Veteran Member
Join Date: Oct 2004
Old 12-29-2004 , 07:25  
Reply With Quote #9

There is a topic in original AMX forums.
There was a complete procedure of spawning sprite on map.
__________________
Current plugin : SoulPunisher anti-cheat
Percentage done : {||--------} 20%

If you think v3x is a PIMP, paste this into your sig!

If you think Bailopan is DA BOMB, paste this into your sig
LynX is offline
Send a message via ICQ to LynX
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 19:23.


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