Raised This Month: $51 Target: $400
 12% 

Solved CS:GO Engine error, help


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Javierko
AlliedModders Donor
Join Date: Sep 2017
Location: Czech republic
Old 01-01-2018 , 06:58   CS:GO Engine error, help
Reply With Quote #1

Hey guys, i am trying to make beam on grabbed player, i did it, but after i drop it, my CS:GO crash and show me this error... And i dont know where is the problem..

Here is the error:


Here is the code:
PHP Code:
public Action_Drop(client)
{
    if( 
IsClientInGame(client) &&
        
g_Status[client][Grab] )
    {
        
g_Status[client][Grab] = false// Tell plugin the grabber has dropped his target
        
if(g_Targetindex[client][Grab] > 0)
        {
            
PrintCenterText(client"%t""Dropped");
            if( 
g_Targetindex[client][Grab] > &&
                
g_Targetindex[client][Grab] <= MaxClients &&
                
IsClientInGame(g_Targetindex[client][Grab]))
            {
                
g_Grabbed[g_Targetindex[client][Grab]] = false// Tell plugin the target is no longer being grabbed
                
SetEntPropFloat(g_Targetindex[client][Grab], Prop_Send"m_flMaxspeed"g_MaxSpeed[client]); // Set speed back to normal
            
}
            
g_Targetindex[client][Grab] = -1;
        }
        else
            
PrintCenterText(client"%t""Not Found");
    }
}

AttachBeam(client)
{
    
decl String:beamindex[30],String:start[30],String:end[30],String:parentName[64];
    
Format(parentNamesizeof(parentName), "%i:%N"clientclient);
    
DispatchKeyValue(client"targetname"parentName);
    new 
Float:vec[3];
    
GetClientAbsOrigin(clientvec);
    
    new 
startent CreateEntityByName("prop_dynamic");
    
Format(startsizeof(start), "start%i"startent);
    
DispatchKeyValue(startent"targetname"start); 
    
DispatchKeyValue(startent"model""models/advisor.mdl"); 
    
DispatchKeyValue(startent"solid""0");
    
DispatchKeyValue(startent"rendermode""10");
    
DispatchSpawn(startent);
    
ActivateEntity(startent);
    
vec[1] += 100//add 100 to the y axis, so it's away from the player itself
    
TeleportEntity(startentvecNULL_VECTORNULL_VECTOR);
    
SetVariantString(parentName);
    
AcceptEntityInput(startent"SetParent");
    
SetVariantString("defusekit");
    
AcceptEntityInput(startent"SetParentAttachmentMaintainOffset");
    
    new 
endent CreateEntityByName("prop_dynamic");
    
Format(endsizeof(end), "end%i"endent);
    
DispatchKeyValue(endent"targetname"end); 
    
DispatchKeyValue(endent"model""models/advisor.mdl"); 
    
DispatchKeyValue(endent"solid""0");
    
DispatchKeyValue(endent"rendermode""10");
    
DispatchSpawn(endent);
    
ActivateEntity(endent);
    
vec[1] -= 200// do the same here, only reverse
    
TeleportEntity(endentvecNULL_VECTORNULL_VECTOR);
    
SetVariantString(parentName);
    
AcceptEntityInput(endent"SetParent");
    
SetVariantString("defusekit");
    
AcceptEntityInput(endent"SetParentAttachmentMaintainOffset");
    
    new 
beament  CreateEntityByName("env_beam");
    if (
IsValidEdict(beament))
    {
        
        
Format(beamindexsizeof(beamindex), "Beam%i"beament);
        
        
// Set keyvalues on the beam.
        
DispatchKeyValue(beament"damage""0");
        
DispatchKeyValue(beament"framestart""0");
        
DispatchKeyValue(beament"BoltWidth""10");
        
DispatchKeyValue(beament"renderfx""0");
        
DispatchKeyValue(beament"TouchType""3");
        
DispatchKeyValue(beament"framerate""0");
        
DispatchKeyValue(beament"decalname""Bigshot");
        
DispatchKeyValue(beament"TextureScroll""35");
        
DispatchKeyValue(beament"HDRColorScale""1.0");
        
DispatchKeyValue(beament"texture""materials/sprites/laserbeam.vmt");
        
DispatchKeyValue(beament"life""20"); 
        
DispatchKeyValue(beament"targetname"beamindex);
        
DispatchKeyValue(beament"LightningStart"start);
        
DispatchKeyValue(beament"LightningEnd"end); 
        
DispatchKeyValue(beament"StrikeTime""1"); 
        
DispatchKeyValue(beament"spawnflags""8"); 
        
DispatchKeyValue(beament"NoiseAmplitude""0"); 
        
DispatchKeyValue(beament"Radius""50");
        
DispatchKeyValue(beament"rendercolor""255 0 0");
        
DispatchKeyValue(beament"renderamt""100");
        
        
DispatchSpawn(beament);
        
ActivateEntity(beament);
        
TeleportEntity(beamentvecNULL_VECTORNULL_VECTOR);
        
CreateTimer(0.5beam_enablebeament);
    }
}

public 
Action:beam_enable(Handle:timerany:beam)
{
    
AcceptEntityInput(beam"TurnOn");

If you know, where is the problem, i will be happy if you tell me how i can fix it, thanks.. ^^
__________________
My Github & Sourcemod work.
If you like my work and if you want to support me, you can through PayPal.

Official SourceMod CZ/SK Discord: https://discord.gg/Qvar55a

Last edited by Javierko; 01-01-2018 at 12:12.
Javierko is offline
Javierko
AlliedModders Donor
Join Date: Sep 2017
Location: Czech republic
Old 01-01-2018 , 12:12   Re: CS:GO Engine error, help
Reply With Quote #2

Solved..

In my case i solved it by using TE_SetupBeamRingPoint...
__________________
My Github & Sourcemod work.
If you like my work and if you want to support me, you can through PayPal.

Official SourceMod CZ/SK Discord: https://discord.gg/Qvar55a

Last edited by Javierko; 01-01-2018 at 13:08.
Javierko is offline
hmmmmm
Great Tester of Whatever
Join Date: Mar 2017
Location: ...
Old 01-01-2018 , 12:23   Re: CS:GO Engine error, help
Reply With Quote #3

Tell us what you did to solve it, in case someone else runs into the same issue and finds this thread

Last edited by hmmmmm; 01-01-2018 at 12:24.
hmmmmm is offline
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 16:15.


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