Raised This Month: $ Target: $400
 0% 

code crash the server


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
JusTGo
Veteran Member
Join Date: Mar 2013
Old 10-12-2014 , 12:53   code crash the server
Reply With Quote #1

hi i m trying to create a hostage wiht this code but it crashed the server wiht no errors:
PHP Code:
#include <amxmodx>
#include <engine>
#include <fakemeta>

new HostageEntity[] = "hostage_entity"

public plugin_precache() 
{
  
precache_model("models/hostage.mdl"),
  
precache_model("models/scientist.mdl")
}

public 
plugin_init() 
{
  
register_clcmd("say /create","create_hostage")
}

public 
create_hostage(id)
{
  new 
origin[3], Float:hostage_origin[3]
  
get_user_origin(idorigin3)
  
IVecFVec(originhostage_origin)

  new 
hostage_ent create_entity(HostageEntity)
  if(
hostage_ent 0
  {
    
DispatchKeyValue(hostage_ent"model""models/hostage.mdl")
    
DispatchSpawn(hostage_ent)
    
entity_set_edict(hostage_entEV_ENT_owner33)
    
hostage_origin[2] += 2
    entity_set_origin
(hostage_enthostage_origin)

    
client_print(idprint_chat"[AMXX] You have created hostage.")
    return 
PLUGIN_HANDLED
  
}   
  return 
PLUGIN_HANDLED 

__________________

Last edited by JusTGo; 10-12-2014 at 12:54.
JusTGo is offline
ironskillz1
AlliedModders Donor
Join Date: Jul 2012
Location: Sweden
Old 10-12-2014 , 13:20   Re: code crash the server
Reply With Quote #2

You can easily see where the plugin crash if you debug it with
Code:
log_amx
__________________
I have many private and unique plugins for Jailbreak and Hide'N'Seek. PM me for more info.

Pm me.

Check out my roulette site.

Last edited by ironskillz1; 10-12-2014 at 13:20.
ironskillz1 is offline
Send a message via Skype™ to ironskillz1
wickedd
Veteran Member
Join Date: Nov 2009
Old 10-12-2014 , 13:29   Re: code crash the server
Reply With Quote #3

It should work on CS maps, but not DE maps.

Edit: I was right. Read this, it should help you.
__________________
Just buy the fucking game!!!!
I hate No-Steamers and lazy ass people.

Last edited by wickedd; 10-12-2014 at 13:32.
wickedd 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 17:33.


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