Raised This Month: $52 Target: $400
 13% 

[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 , 17: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: United States
Old 02-02-2014 , 18: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 , 18: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


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 00:03.


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