Raised This Month: $ Target: $400
 0% 

creating sprites..models ??


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
byetovice
Senior Member
Join Date: Nov 2009
Location: Turkey
Old 11-08-2009 , 03:54   creating sprites..models ??
Reply With Quote #1

Hello.
I'm turkish.So my english isn't good
I want to learn amxmodx scripting...
I can give health to players...godmode...armor..ammo..weapons vb...But i can't create sprites,add models to game..

An example...i cant create a beam from players eye to aiming point
[my bad english ]
there isn't examples in google
if you give me some examples,,i can understand ..

write_byte,write_short vb...
i'm tried it :
Code:
/* Plugin generated by AMXX-Studio */
#include <amxmodx>
#include <amxmisc>
new sprite;
#define PLUGIN "New Plug-In"
#define VERSION "1.0"
#define AUTHOR "author"

public plugin_init() {
 register_plugin(PLUGIN, VERSION, AUTHOR)
 
 register_clcmd("say /sprite","cr_sprite")
 
}
public plugin_precache()
{
 
 sprite = precache_model("sprites/3dmflaora.spr")
}
public cr_sprite(id)
{
new porigin[3], horigin[3];
get_user_origin(id, porigin, 2);
get_user_origin(id, horigin, 3);
message_begin(MSG_BROADCAST, SVC_TEMPENTITY);
 write_byte(9);
write_short(sprite) // Sprite
write_coord(horigin[0] + 1)// Start X
write_coord(horigin[1] + 0)// Start Y
write_coord(horigin[2] + 0)// Start Z
write_coord(horigin[0] - 1)// End X
write_coord(horigin[1] - 0)// End Y
write_coord(horigin[2] - 0)// End Z

message_end()
}

/* AMXX-Studio Notes - DO NOT MODIFY BELOW HERE
*{\\ rtf1\\ ansi\\ deff0{\\ fonttbl{\\ f0\\ fnil Tahoma;}}\n\\ viewkind4\\ uc1\\ pard\\ lang1055\\ f0\\ fs16 \n\\ par }
*/
but it gives an error[bad server message] when i say /sprite

please help me
byetovice is offline
Arkshine
AMX Mod X Plugin Approver
Join Date: Oct 2005
Old 11-08-2009 , 04:26   Re: creating sprites..models ??
Reply With Quote #2

9 it's TE_SPARKS.

Code:
#define TE_SPARKS                   9        // 8 random tracers with gravity, ricochet sprite // write_byte(TE_SPARKS) // write_coord(position.x) // write_coord(position.y) // write_coord(position.z)

TE_SPRITE, it's :

Code:
#define TE_SPRITE                   17       // Additive sprite, plays 1 cycle // write_byte(TE_SPRITE) // write_coord(position.x) // write_coord(position.y) // write_coord(position.z) // write_short(sprite index) // write_byte(scale in 0.1's) // write_byte(brightness)
__________________
Arkshine is offline
byetovice
Senior Member
Join Date: Nov 2009
Location: Turkey
Old 11-08-2009 , 05:05   Re: creating sprites..models ??
Reply With Quote #3

thank you very much
byetovice is offline
byetovice
Senior Member
Join Date: Nov 2009
Location: Turkey
Old 11-08-2009 , 05:18   Re: creating sprites..models ??
Reply With Quote #4

but i cant see anything when i say /sprite
Code:
/* Plugin generated by AMXX-Studio */
#include <amxmodx>
#include <amxmisc>
#include <engine>
new sprite;

#define PLUGIN "New Plug-In"
#define VERSION "1.0"
#define AUTHOR "author"
#define TE_SPRITE                   17       
public plugin_init() {
 register_plugin(PLUGIN, VERSION, AUTHOR)
 register_clcmd("say /sprite","cmdtest")
 
}
public plugin_precache()
{
sprite = precache_model("sprites/flame.spr") 
}
public cmdtest(id)
{
new origin[3];
origin[0] = get_user_origin(id,origin,0)
message_begin(MSG_BROADCAST, SVC_TEMPENTITY);
write_byte(TE_SPRITE);
write_coord(origin[0]);
write_coord(origin[1]);
write_coord(origin[2]);
write_short(sprite);
write_byte(1);
write_byte(127);
message_end();
}

/* AMXX-Studio Notes - DO NOT MODIFY BELOW HERE
*{\\ rtf1\\ ansi\\ deff0{\\ fonttbl{\\ f0\\ fnil Tahoma;}}\n\\ viewkind4\\ uc1\\ pard\\ lang1055\\ f0\\ fs16 \n\\ par }
*/
where is the problem?
byetovice is offline
byetovice
Senior Member
Join Date: Nov 2009
Location: Turkey
Old 11-08-2009 , 06:26   Re: creating sprites..models ??
Reply With Quote #5

who can help me??
byetovice is offline
Reply


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


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