Raised This Month: $ Target: $400
 0% 

code crash the server


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
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
 



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