AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   Dont see the error. (https://forums.alliedmods.net/showthread.php?t=12477)

strizerdragon 04-16-2005 16:49

Dont see the error.
 
I have a prob , the code will compile but if i use it ingame it shuts the game off :cry: .
Can you guys see a error ? :roll:




Code:
#include <amxmodx> #include <fun> #include <amxmisc>   #include <cstrike> #include <engine> #include <amxmod>   public plugin_init() {     register_clcmd("ascend_x","spawn_sprite")     register_plugin("ascend_x","1.0 beta","Strizer")           return PLUGIN_CONTINUE }   new theSprite;    public plugin_precache(){    theSprite = precache_model("sprites/haha.spr"); } public spawn_sprite(id){          new spriteorigin[3];    get_user_origin(id,spriteorigin);    set_view(id, CAMERA_3RDPERSON)      message_begin(MSG_BROADCAST,SVC_TEMPENTITY);    write_byte(500);    write_coord(spriteorigin[0]);        write_coord(spriteorigin[1]);    write_coord(spriteorigin[2]);    write_short(theSprite);        write_byte(20);          write_byte(200);    set_view(id, CAMERA_NONE)    message_end(); }

v3x 04-16-2005 16:52

First off, you should remove <amxmod> from your includes.

strizerdragon 04-16-2005 17:06

I did what you said , but it shuts down the game still . Its said as a error :CL_ParseTEnt: bad type . i hope you guys know what it meens.

thx

[EDIT]

Im going to sleep now.

v3x 04-16-2005 17:09

My post wasn't supposed to be a solution to the problem..

XxAvalanchexX 04-16-2005 17:31

The first byte sent with SVC_TEMPENTITY is the type of temp entity, then all of the other arguments and parameters that go with it. The first byte you send is 500, and there is no temp entity with an ID of 500.

I'm assuming you want to display a sprite, so change the 500 to a 17 (the ID of TE_SPRITE) and it should work.

strizerdragon 04-17-2005 04:45

thx man . But ive another question : how can i let the sprite play longer?

[EDIT]

Please answer. :)

strizerdragon 04-17-2005 12:37

Can somebody answer the post above this one, please :?:

XxAvalanchexX 04-17-2005 19:49

You can't, it only plays one cycle. You have to send the message over and over again.

v3x 04-17-2005 20:15

Hmm, just curious as to what these lines mean and how you got them..

Code:
// ..    write_byte(500);    write_coord(spriteorigin[0]);        write_coord(spriteorigin[1]);    write_coord(spriteorigin[2]);    write_short(theSprite);        write_byte(20);    write_byte(200);
I know the basic ones like in the file Geesu made. :?

XxAvalanchexX 04-18-2005 15:15

Yay and stuff:


All times are GMT -4. The time now is 09:51.

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