AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   Stray key in progres problem (https://forums.alliedmods.net/showthread.php?t=105044)

mAr7obg 09-30-2009 15:25

Stray key in progres problem
 
I have this code and this code give this stupid error please me to fix it.
PHP Code:

#include <amxmodx>
#include <engine>
#include <amxmisc>
#include <cstrike>
#include <hamsandwich>
public MidAirKill
public plugin_init() {
 
register_plugin("x","x","#1")
 
register_event("DeathMsg""eDeathMsg""a")
 
RegisterHam(Ham_Spawn"player""PlayerSpawn"1
 return 
PLUGIN_CONTINUE
}
public 
plugin_precache()  {
 
precache_model("models/server/player/terror/terror.mdl")
 
precache_model("models/server/player/leet/leet.mdl")
 
precache_model("models/server/player/arctic/arctic.mdl")
 
precache_model("models/server/player/guerilla/guerilla.mdl")    
 
precache_model("models/server/player/urban/urban.mdl")
 
precache_model("models/server/player/gsg9/gsg9.mdl")
 
precache_model("models/server/player/sas/sas.mdl")
 
precache_model("models/server/player/gign/gign.mdl")
 return 
PLUGIN_CONTINUE
}
public 
PlayerSpawn(id)  {
 
set_task(1.0"setModels"id)
 return 
PLUGIN_HANDLED

public 
setModels(id) {
 new 
CsTeams:userTeam cs_get_user_team(id)
 if (
userTeam == CS_TEAM_T) {
  
cs_set_user_model(id"terror")
  
cs_set_user_model(id"leet"
  
cs_set_user_model(id"arctic")
  
cs_set_user_model(id"guerilla")   
  } else if(
userTeam == CS_TEAM_CT) {
  
cs_set_user_model(id"urban")
  
cs_set_user_model(id"gsg9"
  
cs_set_user_model(id"sas"
  
cs_set_user_model(id"gign")    
  } else {
  
cs_reset_user_model(id)
 }
 return 
PLUGIN_HANDLED
}
public 
plugin_cfg() {
 
server_cmd("amx_statscfg add MidAirKill MidAirKill")
}
public 
eDeathMsg() {
 new 
killerId read_data(1)
 if (
killerId == 0)
  return 
PLUGIN_CONTINUE
 
new victimId read_data(2)
 new 
bool:enemykill = (get_user_team(killerId) != get_user_team(victimId))
 if (!
MidAirKill || !enemykill || entity_get_int(victimIdEV_INT_flags) & FL_ONGROUND)
  return 
PLUGIN_CONTINUE
 
new Float:victimOrigin[3]
 
entity_get_vector(victimIdEV_VEC_originvictimOrigin)
 
victimOrigin[2] = victimOrigin[2] - 46.0
 
new contents point_contents(victimOrigin)
 if (
contents != CONTENTS_EMPTY && contents != CONTENTS_SKY && contents != CONTENTS_LADDER)
  return 
PLUGIN_CONTINUE
 
new victimName[32], killerName[32]
 
get_user_name(victimIdvictimName31)
 
get_user_name(killerIdkillerName31)
 new 
Float:lowOrigin[3], Float:hitOrigin[3]
 
lowOrigin[0] = victimOrigin[0]
 
lowOrigin[1] = victimOrigin[1]
 
lowOrigin[2] = -2000.0
 trace_line
(victimIdvictimOriginlowOriginhitOrigin)
 new 
Float:distanceToGround vector_distance(victimOriginhitOrigin)
 new 
headshot read_data(3)
 if (
headshot) {
  
client_print(0print_chat"%s picked %s's head out of the sky! (%.0f units from ground)"killerNamevictimNamedistanceToGround)
  } else {
  
client_print(0print_chat"%s killed the flying bird %s! (%.0f units from ground)"killerNamevictimNamedistanceToGround)
 }
 return 
PLUGIN_CONTINUE


[IMG]http://img213.**************/img213/1218/94267318.jpg[/IMG]

AntiBots 09-30-2009 17:17

Re: Stray key in progres problem
 
That Msg is always

mAr7obg 09-30-2009 18:23

Re: Stray key in progres problem
 
hmm no... before install this plugin this is never show. this plugin show this stupid stray key ...

Alka 10-01-2009 14:52

Re: Stray key in progres problem
 
Because you don't have other plugin which use hamsandwich?

mAr7obg 10-01-2009 17:00

Re: Stray key in progres problem
 
hmm 10x


All times are GMT -4. The time now is 22:33.

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