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

[TF2] crash with simple_bot entity


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
arthurdead
Senior Member
Join Date: Jul 2013
Old 02-02-2014 , 16:50   [TF2] crash with simple_bot entity
Reply With Quote #1

i was trying to make some kind fo civillian that walk around the map and when you touch then they talk to you but when i spawn the simple_bot entity the game just crashes i use this

PHP Code:
public SpawnCivillian(client)
{
    new 
Float:pos[3];
    new 
Float:ang[3];
    
GetClientEyeAngles(clientang);
    
GetClientEyePosition(clientpos);
    new 
civ CreateEntityByName("simple_bot");
    if(
civ != -1)
    {
        
DispatchSpawn(civ);
        
ActivateEntity(civ);
        
TeleportEntity(civposangNULL_VECTOR);
        
SDKHook(civSDKHook_TouchOnTouch);
    }
}

public 
Action:OnTouch(entityother)
{
    if(
IsValidClient(other))
    {
        new 
Float:pos[3];
        
GetClientAbsOrigin(otherpos);
        
SetEntityMoveType(entityMOVETYPE_NONE);
        
TeleportEntity(entityNULL_VECTORposNULL_VECTOR);
    }

arthurdead is offline
ReFlexPoison
☠☠☠
Join Date: Jul 2011
Location: ☠☠☠
Old 02-02-2014 , 17:12   Re: [TF2] crash with simple_bot entity
Reply With Quote #2

PHP Code:
public OnMapStart()
{
    
PrecacheModel("models/humans/group01/female_01.mdl"true);

ReFlexPoison is offline
arthurdead
Senior Member
Join Date: Jul 2013
Old 02-02-2014 , 17:14   Re: [TF2] crash with simple_bot entity
Reply With Quote #3

Quote:
Originally Posted by ReFlexPoison View Post
PHP Code:
public OnMapStart()
{
    
PrecacheModel("models/humans/group01/female_01.mdl"true);

many thanks
arthurdead 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 12:24.


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