Raised This Month: $32 Target: $400
 8% 

TE_SetupBloodSprite()


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
dalto
Veteran Member
Join Date: Jul 2007
Old 08-22-2007 , 10:04   TE_SetupBloodSprite()
Reply With Quote #1

I cannot get TE_SetupBloodSprite() to work. I know I must be doing something stupid here. I wrote a simple program to demonstrate me not making it work.

Any help anyone could offer would be most appreciated.

Code:
#include <sourcemod> #include <sdktools> #pragma semicolon 1 #define PLUGIN_VERSION "1.0" // Plugin definitions public Plugin:myinfo = {     name = "Blood Test",     author = "AMP",     description = "It is just test code",     version = PLUGIN_VERSION,     url = "http://forums.alliedmods.net" }; // Global Variables new g_bloodModel; new g_sprayModel; public OnPluginStart() {     HookEvent("player_spawn", EventPlayerSpawn, EventHookMode_Post); } public EventPlayerSpawn(Handle:event, const String:name[], bool:dontBroadcast) {     new client = GetClientOfUserId(GetEventInt(event, "userid"));     CreateTimer(2.0, TimerCreateDrops, client, TIMER_REPEAT); } public Action:TimerCreateDrops(Handle:timer, any:client) {     new Float:vec[3];     new Float:upVec[3];     new Float:rightVec[3];     static const color[] = {255,15,15,255};         if(IsClientInGame(client) && IsPlayerAlive(client) && GetClientHealth(client) < 100)     {         GetClientAbsOrigin(client, vec);         vec[0] -= 30;         vec[1] -= 30;         GetVectorVectors(vec, rightVec, upVec);         TE_SetupBloodSprite(vec, rightVec, color, 25, g_sprayModel, g_bloodModel);     } } public OnMapStart() {     g_bloodModel = PrecacheModel("sprites/blood.vmt", true);     g_sprayModel = PrecacheModel("sprites/bloodspray.vmt", true); }
NOTE: I realize the timers will stack, this is just for the purpose of demonstrating the problem I am having.
dalto is offline
Peoples Army
SourceMod Donor
Join Date: Mar 2007
Old 08-22-2007 , 10:12   Re: TE_SetupBloodSprite()
Reply With Quote #2

hard to tell . i would add a client print message right after your conditions and right when u try to make the blood on the player . just to see if your function is fireing at all , if it prints than it must be soemthing else .
Peoples Army is offline
dalto
Veteran Member
Join Date: Jul 2007
Old 08-22-2007 , 10:15   Re: TE_SetupBloodSprite()
Reply With Quote #3

Quote:
Originally Posted by Peoples Army View Post
hard to tell . i would add a client print message right after your conditions and right when u try to make the blood on the player . just to see if your function is fireing at all , if it prints than it must be soemthing else .
I have, I have checked the values of every parameter. I have checked to ensure that the everything is populated correctly. I even validated the setup of the tempent stock against valve's own code.
dalto is offline
Peoples Army
SourceMod Donor
Join Date: Mar 2007
Old 08-22-2007 , 10:23   Re: TE_SetupBloodSprite()
Reply With Quote #4

omg , i cant belevie i missed this at first , you ahve to send messages in source .


Code:
 
TE_SendToAll();
Peoples Army is offline
dalto
Veteran Member
Join Date: Jul 2007
Old 08-22-2007 , 11:09   Re: TE_SetupBloodSprite()
Reply With Quote #5

Quote:
Originally Posted by Peoples Army View Post
omg , i cant belevie i missed this at first , you ahve to send messages in source .


Code:
 
TE_SendToAll();
*sigh*

I have been working on this for well over a week and I never noticed that I wasn't sending the tempent.

*sigh*
dalto is offline
Peoples Army
SourceMod Donor
Join Date: Mar 2007
Old 08-22-2007 , 11:34   Re: TE_SetupBloodSprite()
Reply With Quote #6

lol ! dont worry about dalto , it happens to the best of us . you look at the code for more then a few hours and things start to slip past you .
Peoples Army 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 10:18.


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