From bd412d720487b62a94d7735cfa432d0d38f856b7 Mon Sep 17 00:00:00 2001 From: Steve Dudenhoeffer Date: Mon, 5 Mar 2007 19:30:40 +0000 Subject: [PATCH] Fixed bug amb70 - include files not semicolon-correct Also, removed OLOcode from amxmisc.inc --- plugins/include/amxconst.inc | 2 +- plugins/include/amxmisc.inc | 319 ++++++++++++++++------------ plugins/include/dbi.inc | 25 ++- plugins/include/engine.inc | 8 +- plugins/include/engine_stocks.inc | 168 ++++++++------- plugins/include/fakemeta.inc | 2 +- plugins/include/fakemeta_stocks.inc | 231 ++++++++++---------- plugins/include/ns.inc | 2 +- plugins/include/ns2amx.inc | 168 +++++++-------- plugins/include/nvault.inc | 2 +- plugins/include/sqlx.inc | 50 ++--- plugins/include/string.inc | 2 +- plugins/include/tsfun.inc | 36 ++-- plugins/include/vector.inc | 18 +- 14 files changed, 554 insertions(+), 479 deletions(-) diff --git a/plugins/include/amxconst.inc b/plugins/include/amxconst.inc index c12d7b5c..704f963b 100755 --- a/plugins/include/amxconst.inc +++ b/plugins/include/amxconst.inc @@ -13,7 +13,7 @@ #define AMXX_VERSION 1.764 #define AMXX_VERSION_NUM 176 -stock const AMXX_VERSION_STR[]="1.76d" +stock const AMXX_VERSION_STR[]="1.76d"; #define M_PI 3.1415926535 diff --git a/plugins/include/amxmisc.inc b/plugins/include/amxmisc.inc index 9d38a5a1..704ce3fc 100755 --- a/plugins/include/amxmisc.inc +++ b/plugins/include/amxmisc.inc @@ -29,48 +29,64 @@ stock is_user_admin(id) { - return ( get_user_flags(id)>0 && !(get_user_flags(id)&ADMIN_USER) ) + return ( get_user_flags(id)>0 && !(get_user_flags(id)&ADMIN_USER) ); } -stock cmd_access(id,level,cid,num) { - new has_access = 0 - if ( id==(is_dedicated_server()?0:1) ) { - has_access = 1 - } else if ( level==ADMIN_ADMIN ) { - if ( is_user_admin(id) ) - has_access = 1 - } else if ( get_user_flags(id) & level ) { - has_access = 1 - } else if (level == ADMIN_ALL) { - has_access = 1 - } +stock cmd_access(id,level,cid,num) +{ + new has_access = 0; + if ( id==(is_dedicated_server()?0:1) ) + { + has_access = 1; + } + else if ( level==ADMIN_ADMIN ) + { + if ( is_user_admin(id) ) + { + has_access = 1; + } + } + else if ( get_user_flags(id) & level ) + { + has_access = 1; + } + else if (level == ADMIN_ALL) + { + has_access = 1; + } - if ( has_access==0 ) { + if ( has_access==0 ) + { #if defined AMXMOD_BCOMPAT - console_print(id, SIMPLE_T("You have no access to that command.")) + console_print(id, SIMPLE_T("You have no access to that command.")); #else - console_print(id,"%L",id,"NO_ACC_COM") + console_print(id,"%L",id,"NO_ACC_COM"); #endif - return 0 - } - if (read_argc() < num) { - new hcmd[32], hinfo[128], hflag - get_concmd(cid,hcmd,31,hflag,hinfo,127,level) + return 0; + } + if (read_argc() < num) + { + new hcmd[32], hinfo[128], hflag; + get_concmd(cid,hcmd,31,hflag,hinfo,127,level); #if defined AMXMOD_BCOMPAT - console_print(id, SIMPLE_T("Usage: %s %s"), hcmd, SIMPLE_T(hinfo)) + console_print(id, SIMPLE_T("Usage: %s %s"), hcmd, SIMPLE_T(hinfo)); #else - console_print(id,"%L: %s %s",id,"USAGE",hcmd,hinfo) + console_print(id,"%L: %s %s",id,"USAGE",hcmd,hinfo); #endif - return 0 - } - return 1 + return 0; + } + + return 1; } -stock access(id,level) { - if ( level==ADMIN_ADMIN ) - return is_user_admin(id) +stock access(id,level) +{ + if ( level==ADMIN_ADMIN ) + { + return is_user_admin(id); + } - return (get_user_flags(id) & level) + return (get_user_flags(id) & level); } /* Flags: @@ -78,124 +94,150 @@ stock access(id,level) { * 2 - allow yourself * 4 - must be alive * 8 - can't be bot */ -stock cmd_target(id,const arg[],flags = 1) { - new player = find_player("bl",arg) - if (player) { - if ( player != find_player("blj",arg) ) { +stock cmd_target(id,const arg[],flags = 1) +{ + new player = find_player("bl",arg); + if (player) + { + if ( player != find_player("blj",arg) ) + { #if defined AMXMOD_BCOMPAT - console_print(id, SIMPLE_T("There are more clients matching to your argument")) + console_print(id, SIMPLE_T("There are more clients matching to your argument")); #else - console_print(id,"%L",id,"MORE_CL_MATCHT") + console_print(id,"%L",id,"MORE_CL_MATCHT"); #endif - return 0 - } - } - else if ( ( player = find_player("c",arg) )==0 && arg[0]=='#' && arg[1] ) - player = find_player("k",str_to_num(arg[1])) - if (!player) { + return 0; + } + } + else if ( ( player = find_player("c",arg) )==0 && arg[0]=='#' && arg[1] ) + { + player = find_player("k",str_to_num(arg[1])); + } + if (!player) + { #if defined AMXMOD_BCOMPAT - console_print(id, SIMPLE_T("Client with that name or userid not found")) + console_print(id, SIMPLE_T("Client with that name or userid not found")); #else - console_print(id,"%L",id,"CL_NOT_FOUND") + console_print(id,"%L",id,"CL_NOT_FOUND"); #endif - return 0 - } - if (flags & 1) { - if ((get_user_flags(player)&ADMIN_IMMUNITY) && ((flags&2)?(id!=player):true) ) { - new imname[32] - get_user_name(player,imname,31) + return 0; + } + if (flags & 1) + { + if ((get_user_flags(player)&ADMIN_IMMUNITY) && ((flags&2)?(id!=player):true) ) + { + new imname[32]; + get_user_name(player,imname,31); #if defined AMXMOD_BCOMPAT - console_print(id, SIMPLE_T("Client ^"%s^" has immunity"), imname) + console_print(id, SIMPLE_T("Client ^"%s^" has immunity"), imname); #else - console_print(id,"%L",id,"CLIENT_IMM",imname) + console_print(id,"%L",id,"CLIENT_IMM",imname); #endif - return 0 - } - } - if (flags & 4) { - if (!is_user_alive(player)) { - new imname[32] - get_user_name(player,imname,31) + return 0; + } + } + if (flags & 4) + { + if (!is_user_alive(player)) + { + new imname[32]; + get_user_name(player,imname,31); #if defined AMXMOD_BCOMPAT - console_print(id, SIMPLE_T("That action can't be performed on dead client ^"%s^""), imname) + console_print(id, SIMPLE_T("That action can't be performed on dead client ^"%s^""), imname); #else - console_print(id,"%L",id,"CANT_PERF_DEAD",imname) + console_print(id,"%L",id,"CANT_PERF_DEAD",imname); #endif - return 0 - } - } - if (flags & 8) { - if (is_user_bot(player)) { - new imname[32] - get_user_name(player,imname,31) + return 0; + } + } + if (flags & 8) + { + if (is_user_bot(player)) + { + new imname[32]; + get_user_name(player,imname,31); #if defined AMXMOD_BCOMPAT - console_print(id, SIMPLE_T("That action can't be performed on bot ^"%s^""), imname) + console_print(id, SIMPLE_T("That action can't be performed on bot ^"%s^""), imname); #else - console_print(id,"%L",id,"CANT_PERF_BOT",imname) + console_print(id,"%L",id,"CANT_PERF_BOT",imname); #endif - return 0 - } - } - return player + return 0; + } + } + return player; } -stock show_activity( id, const name[], {Float,_}: ... ) { - new buffer[128] - format_args( buffer , 127 , 2 ) - switch(get_cvar_num("amx_show_activity")) - { - case 2: +stock show_activity( id, const name[], {Float,_}: ... ) +{ + new buffer[128]; + format_args( buffer , 127 , 2 ); + switch(get_cvar_num("amx_show_activity")) + { + case 2: #if defined AMXMOD_BCOMPAT - client_print(0, print_chat, "%s %s: %s", is_user_admin(id) ? SIMPLE_T("ADMIN") : SIMPLE_T("PLAYER"), name, buffer) + client_print(0, print_chat, "%s %s: %s", is_user_admin(id) ? SIMPLE_T("ADMIN") : SIMPLE_T("PLAYER"), name, buffer); #else - client_print(0, print_chat, "%L %s: %s", id, is_user_admin(id) ? "ADMIN" : "PLAYER" , name , buffer ) + client_print(0, print_chat, "%L %s: %s", id, is_user_admin(id) ? "ADMIN" : "PLAYER" , name , buffer ); #endif - case 1: + case 1: #if defined AMXMOD_BCOMPAT - client_print(0, print_chat, "%s: %s", is_user_admin(id) ? SIMPLE_T("ADMIN") : SIMPLE_T("PLAYER"), buffer) + client_print(0, print_chat, "%s: %s", is_user_admin(id) ? SIMPLE_T("ADMIN") : SIMPLE_T("PLAYER"), buffer); #else - client_print(0, print_chat, "%L: %s", id, is_user_admin(id) ? "ADMIN" : "PLAYER", buffer ) + client_print(0, print_chat, "%L: %s", id, is_user_admin(id) ? "ADMIN" : "PLAYER", buffer ); #endif - } + } } -stock colored_menus() { - new mod_name[32] - get_modname(mod_name,31) +stock colored_menus() +{ + new mod_name[32]; + get_modname(mod_name,31); - return ( equal(mod_name,"cstrike") || equal(mod_name,"czero") || equal(mod_name,"dod") ) + return ( equal(mod_name,"cstrike") || equal(mod_name,"czero") || equal(mod_name,"dod") ); } -stock cstrike_running() { - new mod_name[32] - get_modname(mod_name,31) +stock cstrike_running() +{ + new mod_name[32]; + get_modname(mod_name,31); - return ( equal(mod_name,"cstrike") || equal(mod_name,"czero") || equal(mod_name,"csv15") || equal(mod_name,"cs13") ) + return ( equal(mod_name,"cstrike") || equal(mod_name,"czero") || equal(mod_name,"csv15") || equal(mod_name,"cs13") ); } -stock is_running(const mod[]) { - new mod_name[32] - get_modname(mod_name,31) +stock is_running(const mod[]) +{ + new mod_name[32]; + get_modname(mod_name,31); - return equal(mod_name,mod) + return equal(mod_name,mod); } stock get_basedir(name[],len) - return get_localinfo("amxx_basedir",name,len) +{ + return get_localinfo("amxx_basedir",name,len); +} stock get_configsdir(name[],len) - return get_localinfo("amxx_configsdir",name,len) +{ + return get_localinfo("amxx_configsdir",name,len); +} stock get_datadir(name[],len) - return get_localinfo("amxx_datadir",name,len) +{ + return get_localinfo("amxx_datadir",name,len); +} stock register_menu(const title[],keys,const function[],outside=0) - register_menucmd(register_menuid(title,outside),keys,function) +{ + register_menucmd(register_menuid(title,outside),keys,function); +} /* Backwards Compatibility * don't use it! */ stock get_customdir(name[],len) - return get_localinfo("amxx_configsdir",name,len) +{ + return get_localinfo("amxx_configsdir",name,len); +} /* Add a menu item to Menus Front-End plugin ("amxmodmenu"): * MENU_TEXT: Text that will be shown for this item in menu @@ -203,57 +245,68 @@ stock get_customdir(name[],len) * MENU_ACCESS: Access required for menu * MENU_PLUGIN: The exact case-insensitive name of plugin holding the menu command */ -stock AddMenuItem(const MENU_TEXT[], const MENU_CMD[], const MENU_ACCESS, const MENU_PLUGIN[]) { - AddMenuItem_call(MENU_TEXT, MENU_CMD, MENU_ACCESS, MENU_PLUGIN, false) +stock AddMenuItem(const MENU_TEXT[], const MENU_CMD[], const MENU_ACCESS, const MENU_PLUGIN[]) +{ + AddMenuItem_call(MENU_TEXT, MENU_CMD, MENU_ACCESS, MENU_PLUGIN, false); } /* Just like above, but add menu item to "amx_menu", that should also be accessible by non-admins. */ -stock AddClientMenuItem(const MENU_TEXT[], const MENU_CMD[], const MENU_ACCESS, const MENU_PLUGIN[]) { - AddMenuItem_call(MENU_TEXT, MENU_CMD, MENU_ACCESS, MENU_PLUGIN, true) +stock AddClientMenuItem(const MENU_TEXT[], const MENU_CMD[], const MENU_ACCESS, const MENU_PLUGIN[]) +{ + AddMenuItem_call(MENU_TEXT, MENU_CMD, MENU_ACCESS, MENU_PLUGIN, true); } // Internal function used by above stocks. -stock AddMenuItem_call(const MENU_TEXT[], const MENU_CMD[], const MENU_ACCESS, const MENU_PLUGIN[], const bool:ADD_TO_CLIENT_MENU) { - new pluginid = is_plugin_loaded("Menus Front-End") +stock AddMenuItem_call(const MENU_TEXT[], const MENU_CMD[], const MENU_ACCESS, const MENU_PLUGIN[], const bool:ADD_TO_CLIENT_MENU) +{ + new pluginid = is_plugin_loaded("Menus Front-End"); if (pluginid == -1) { - log_amx("Can't add menu item ^"%s^" from plugin ^"%s^" to menu set because the Menus Front-End plugin itself is not loaded!", MENU_TEXT, MENU_PLUGIN) - return // Menus Front-End doesn't exist, return. + log_amx("Can't add menu item ^"%s^" from plugin ^"%s^" to menu set because the Menus Front-End plugin itself is not loaded!", MENU_TEXT, MENU_PLUGIN); + return; // Menus Front-End doesn't exist, return. } - new filename[64], b[1] - get_plugin(pluginid, filename, 63, b, 0, b, 0, b, 0, b, 0) + new filename[64], b[1]; + get_plugin(pluginid, filename, 63, b, 0, b, 0, b, 0, b, 0); - new status = callfunc_begin(ADD_TO_CLIENT_MENU ? "AddClientMenu" : "AddMenu", filename) - new bool:failed = true - switch (status) { - case 1: failed = false - case 0: log_amx("Run time error! (AddMenuItem_call failed)") - case -2: log_amx("Function not found! (AddMenuItem_call failed)") - case -1: log_amx("Plugin not found! (AddMenuItem_call failed)") + new status = callfunc_begin(ADD_TO_CLIENT_MENU ? "AddClientMenu" : "AddMenu", filename); + new bool:failed = true; + switch (status) + { + case 1: failed = false; + case 0: log_amx("Run time error! (AddMenuItem_call failed)"); + case -2: log_amx("Function not found! (AddMenuItem_call failed)"); + case -1: log_amx("Plugin not found! (AddMenuItem_call failed)"); } if (failed) - return + { + return; + } // Item text - callfunc_push_str(MENU_TEXT) + callfunc_push_str(MENU_TEXT); // Cmd - callfunc_push_str(MENU_CMD) + callfunc_push_str(MENU_CMD); // Access - callfunc_push_int(MENU_ACCESS) + callfunc_push_int(MENU_ACCESS); // Menu exists in this plugin - callfunc_push_str(MENU_PLUGIN) + callfunc_push_str(MENU_PLUGIN); - callfunc_end() + callfunc_end(); } stock constraint_offset(low, high, seed, offset) { - new numElements = high - low + 1; - offset += seed - low; + new numElements = high - low + 1; + offset += seed - low; - if (offset >= 0) - return low + (offset % numElements); - else - return high - (abs(offset) % numElements) + 1; - return 0; // Makes the compiler happy -_- + if (offset >= 0) + { + return low + (offset % numElements); + } + else + { + return high - (abs(offset) % numElements) + 1; + } + + return 0; // Makes the compiler happy -_- } diff --git a/plugins/include/dbi.inc b/plugins/include/dbi.inc index 5355550a..7c1c954e 100755 --- a/plugins/include/dbi.inc +++ b/plugins/include/dbi.inc @@ -119,20 +119,27 @@ native dbi_field_name(Result:result, field, name[], maxLength); /* This function can be used to find out if a table in a Sqlite database exists. */ -stock bool:sqlite_table_exists(Sql:sql, table[]) { - new bool:exists - new query[128] - format(query, 127, "SELECT name FROM sqlite_master WHERE type='table' AND name='%s' LIMIT 1;", table) +stock bool:sqlite_table_exists(Sql:sql, table[]) +{ + new bool:exists; + new query[128]; + format(query, 127, "SELECT name FROM sqlite_master WHERE type='table' AND name='%s' LIMIT 1;", table); - new Result:result = dbi_query(sql, query) + new Result:result = dbi_query(sql, query); if (dbi_nextrow(result)) - exists = true + { + exists = true; + } else - exists = false + { + exists = false; + } if (result > RESULT_NONE) - dbi_free_result(result) + { + dbi_free_result(result); + } - return exists + return exists; } diff --git a/plugins/include/engine.inc b/plugins/include/engine.inc index 49c573fd..5695a843 100755 --- a/plugins/include/engine.inc +++ b/plugins/include/engine.inc @@ -42,11 +42,11 @@ native register_think(const Classname[], const function[]); native precache_event(type, const Name[], {Float,Sql,Result,_}:...); /* set/get a user's speak flags */ -native set_speak(iIndex, iSpeakFlags) -native get_speak(iIndex) +native set_speak(iIndex, iSpeakFlags); +native get_speak(iIndex); /* Drops an entity to the floor (work?) */ -native drop_to_floor(entity) +native drop_to_floor(entity); /* Get whole buffer containing keys and their data. */ native get_info_keybuffer(id, buffer[], length); @@ -98,7 +98,7 @@ native find_ent_by_model(iIndex, const szClass[], const szModel[]); native find_ent_in_sphere(start_from_ent, const Float:origin[3], Float:radius); //this will CBaseEntity::Think() or something from the entity -native call_think(entity) +native call_think(entity); /* Is entity valid? */ native is_valid_ent(iIndex); diff --git a/plugins/include/engine_stocks.inc b/plugins/include/engine_stocks.inc index 05ac6fa0..f604de95 100755 --- a/plugins/include/engine_stocks.inc +++ b/plugins/include/engine_stocks.inc @@ -21,125 +21,131 @@ stock fakedamage(idvictim,const szClassname[],Float:takedmgdamage,damagetype) { - new entity = create_entity("trigger_hurt") + new entity = create_entity("trigger_hurt"); if (entity) { - DispatchKeyValue(entity,"classname","trigger_hurt") - new szDamage[16] + DispatchKeyValue(entity,"classname","trigger_hurt"); + new szDamage[16]; // Takedamages only do half damage per attack (damage is damage per second, and it's triggered in 0.5 second intervals). // Compensate for that. - format(szDamage,15,"%f",takedmgdamage * 2) - DispatchKeyValue(entity,"dmg",szDamage) - format(szDamage,15,"%i",damagetype) - DispatchKeyValue(entity,"damagetype",szDamage) - DispatchKeyValue(entity,"origin","8192 8192 8192") - DispatchSpawn(entity) - entity_set_string(entity, EV_SZ_classname, szClassname) - fake_touch(entity,idvictim) - remove_entity(entity) - return 1 + format(szDamage,15,"%f",takedmgdamage * 2); + DispatchKeyValue(entity,"dmg",szDamage); + format(szDamage,15,"%i",damagetype); + DispatchKeyValue(entity,"damagetype",szDamage); + DispatchKeyValue(entity,"origin","8192 8192 8192"); + DispatchSpawn(entity); + entity_set_string(entity, EV_SZ_classname, szClassname); + fake_touch(entity,idvictim); + remove_entity(entity); + return 1; } - return 0 + return 0; } //wrapper for find_ent_by_class stock find_ent(iStart, const szClassname[]) { - return find_ent_by_class(iStart, szClassname) + return find_ent_by_class(iStart, szClassname); } /* Get the Button(s) user is pressing */ stock get_user_button(id) - return entity_get_int(id, EV_INT_button) +{ + return entity_get_int(id, EV_INT_button); +} stock get_user_oldbutton(id) - return entity_get_int(id, EV_INT_oldbuttons) +{ + return entity_get_int(id, EV_INT_oldbuttons); +} /* Get flags an entity is flagged with */ stock get_entity_flags(ent) - return entity_get_int(ent, EV_INT_flags) +{ + return entity_get_int(ent, EV_INT_flags); +} /* Get the distance between two entities */ stock get_entity_distance(ent1, ent2) { - return floatround(entity_range(ent1, ent2)) + return floatround(entity_range(ent1, ent2)); } /* Get grenade thrown by this user */ stock get_grenade(id) { - new iGrenade = find_ent_by_class(-1, "grenade") + new iGrenade = find_ent_by_class(-1, "grenade"); while(iGrenade > 0) { if(entity_get_edict(iGrenade, EV_ENT_owner) == id) - return iGrenade + return iGrenade; - iGrenade = find_ent_by_class(iGrenade, "grenade") + iGrenade = find_ent_by_class(iGrenade, "grenade"); } - return 0 + return 0; } /* Get origin of a brush entity */ stock get_brush_entity_origin(ent, Float:orig[3]) { - new Float:Min[3], Float:Max[3] - entity_get_vector(ent, EV_VEC_mins, Min) - entity_get_vector(ent, EV_VEC_maxs, Max) + new Float:Min[3], Float:Max[3]; + entity_get_vector(ent, EV_VEC_mins, Min); + entity_get_vector(ent, EV_VEC_maxs, Max); - orig[0] = (Min[0] + Max[0]) * 0.5 - orig[1] = (Min[1] + Max[1]) * 0.5 - orig[2] = (Min[2] + Max[2]) * 0.5 + orig[0] = (Min[0] + Max[0]) * 0.5; + orig[1] = (Min[1] + Max[1]) * 0.5; + orig[2] = (Min[2] + Max[2]) * 0.5; - return 1 + return 1; } /* Remove entity by name */ stock remove_entity_name(const eName[]) { - new iEntity = find_ent_by_class(-1, eName) + new iEntity = find_ent_by_class(-1, eName); while (iEntity > 0) { - remove_entity(iEntity) - iEntity = find_ent_by_class(-1, eName) + remove_entity(iEntity); + iEntity = find_ent_by_class(-1, eName); } - return 1 + return 1; } /* Get the contents of the point a user is aiming at */ stock ViewContents(id) { - new origin[3], Float:Orig[3] - get_user_origin(id, origin, 3) - Orig[0] = float(origin[0]) - Orig[1] = float(origin[1]) - Orig[2] = float(origin[2]) + new origin[3], Float:Orig[3]; + get_user_origin(id, origin, 3); + Orig[0] = float(origin[0]); + Orig[1] = float(origin[1]); + Orig[2] = float(origin[2]); - return point_contents(Orig) + return point_contents(Orig); } stock get_speed(ent) { - new Float:Vel[3] - entity_get_vector(ent, EV_VEC_velocity, Vel) + new Float:Vel[3]; + entity_get_vector(ent, EV_VEC_velocity, Vel); - return floatround(vector_length(Vel)) + return floatround(vector_length(Vel)); } /* Set rendering of an entity */ stock set_rendering(index, fx=kRenderFxNone, r=255, g=255, b=255, render=kRenderNormal, amount=16) { - entity_set_int(index,EV_INT_renderfx,fx) - new Float:RenderColor[3] - RenderColor[0] = float(r) - RenderColor[1] = float(g) - RenderColor[2] = float(b) - entity_set_vector(index,EV_VEC_rendercolor,RenderColor) - entity_set_int(index,EV_INT_rendermode,render) - entity_set_float(index,EV_FL_renderamt,float(amount)) + entity_set_int(index,EV_INT_renderfx,fx); + new Float:RenderColor[3]; + RenderColor[0] = float(r); + RenderColor[1] = float(g); + RenderColor[2] = float(b); + entity_set_vector(index,EV_VEC_rendercolor,RenderColor); + entity_set_int(index,EV_INT_rendermode,render); + entity_set_float(index,EV_FL_renderamt,float(amount)); - return 1 + return 1; } /* Set flags on an entity */ @@ -149,76 +155,82 @@ stock set_entity_flags(ent,flag,onoff) { if (onoff == 1) { - return 2 + return 2; } else { - entity_set_int(ent,EV_INT_flags,entity_get_int(ent,EV_INT_flags)-flag) - return 1 + entity_set_int(ent,EV_INT_flags,entity_get_int(ent,EV_INT_flags)-flag); + return 1; } } else { if (onoff == 0) { - return 2 + return 2; } else { - entity_set_int(ent,EV_INT_flags,entity_get_int(ent,EV_INT_flags)+flag) - return 1 + entity_set_int(ent,EV_INT_flags,entity_get_int(ent,EV_INT_flags)+flag); + return 1; } } - return 0 + return 0; } /* If visible = 1, entity will be set to be visible, else invisible. */ -stock set_entity_visibility(entity, visible = 1) { - entity_set_int(entity, EV_INT_effects, visible == 1 ? entity_get_int(entity, EV_INT_effects) & ~EF_NODRAW : entity_get_int(entity, EV_INT_effects) | EF_NODRAW) +stock set_entity_visibility(entity, visible = 1) +{ + entity_set_int(entity, EV_INT_effects, visible == 1 ? entity_get_int(entity, EV_INT_effects) & ~EF_NODRAW : entity_get_int(entity, EV_INT_effects) | EF_NODRAW); - return 1 + return 1; } /* Returns 1 if entity is visible. */ -stock get_entity_visibility(entity) { - return !(entity_get_int(entity, EV_INT_effects) & EF_NODRAW) +stock get_entity_visibility(entity) +{ + return !(entity_get_int(entity, EV_INT_effects) & EF_NODRAW); } stock set_user_velocity(entity, const Float:vec[3]) { - return entity_set_vector(entity, EV_VEC_velocity, vec) + return entity_set_vector(entity, EV_VEC_velocity, vec); } stock get_user_velocity(entity, Float:vec[3]) { - return entity_get_vector(entity, EV_VEC_velocity, vec) + return entity_get_vector(entity, EV_VEC_velocity, vec); } /* Backwards compatible */ /* Hurts/Kills players in a sphere, like an explosion, Multiplier determines damage. */ -stock RadiusDamage(const Float:fExplodeAt[3], iDamageMultiplier, iRadiusMultiplier) { - return radius_damage(fExplodeAt, iDamageMultiplier, iRadiusMultiplier) +stock RadiusDamage(const Float:fExplodeAt[3], iDamageMultiplier, iRadiusMultiplier) +{ + return radius_damage(fExplodeAt, iDamageMultiplier, iRadiusMultiplier); } /* Gives you a velocity in the direction a player is looking, iVelocity is the multiplier. */ -stock VelocityByAim(iIndex,iVelocity, Float:vRetValue[3]) { - return velocity_by_aim(iIndex,iVelocity,vRetValue) +stock VelocityByAim(iIndex,iVelocity, Float:vRetValue[3]) +{ + return velocity_by_aim(iIndex,iVelocity,vRetValue); } /* Will return the contents of a point (inside map? in sky? outside map? etc.). */ -stock PointContents(const Float:fCheckAt[3]) { - return point_contents(fCheckAt); +stock PointContents(const Float:fCheckAt[3]) +{ + return point_contents(fCheckAt); } -stock set_size(index, const Float:mins[3], const Float:maxs[3]) { - return entity_set_size(index,mins,maxs) +stock set_size(index, const Float:mins[3], const Float:maxs[3]) +{ + return entity_set_size(index,mins,maxs); } //by Twilight Suzuka, request addition at29428 //"Lifted from HLSDK" stock IsInWorld( ent ) { - new Float:origin[3] - entity_get_vector(ent,EV_VEC_origin,origin) + new Float:origin[3]; + entity_get_vector(ent,EV_VEC_origin,origin); if (origin[0] >= 4096.0) return 0; if (origin[1] >= 4096.0) return 0; @@ -227,8 +239,8 @@ stock IsInWorld( ent ) if (origin[1] <= -4096.0) return 0; if (origin[2] <= -4096.0) return 0; - new Float:velocity[3] - entity_get_vector(ent,EV_VEC_velocity,velocity) + new Float:velocity[3]; + entity_get_vector(ent,EV_VEC_velocity,velocity); if (velocity[0] >= 2000) return 0; if (velocity[1] >= 2000) return 0; diff --git a/plugins/include/fakemeta.inc b/plugins/include/fakemeta.inc index 40adba96..18021f9f 100755 --- a/plugins/include/fakemeta.inc +++ b/plugins/include/fakemeta.inc @@ -86,7 +86,7 @@ native forward_return(type,{Float,Sql,Result,_}:...); * get_orig_retval(&Float:value) - retrieves float return value by reference * get_orig_retval(value[], len) - retrives string return value */ -native get_orig_retval({Float,_}:...) +native get_orig_retval({Float,_}:...); native engfunc(type,{Float,Sql,Result,AlertType,_}:...); native dllfunc(type,{Float,Sql,Result,_}:...); diff --git a/plugins/include/fakemeta_stocks.inc b/plugins/include/fakemeta_stocks.inc index d3939b3b..0eb6fa0b 100755 --- a/plugins/include/fakemeta_stocks.inc +++ b/plugins/include/fakemeta_stocks.inc @@ -16,257 +16,258 @@ // EngFuncs stock EF_PrecacheModel(const string[]) - return engfunc(EngFunc_PrecacheModel, string) + return engfunc(EngFunc_PrecacheModel, string); + stock EF_PrecacheSound(const string[]) - return engfunc(EngFunc_PrecacheSound, string) + return engfunc(EngFunc_PrecacheSound, string); stock EF_SetModel(const ID, const STRING[]) - return engfunc(EngFunc_SetModel, ID, STRING) + return engfunc(EngFunc_SetModel, ID, STRING); stock EF_ModelIndex(const STRING[]) - return engfunc(EngFunc_ModelIndex, STRING) + return engfunc(EngFunc_ModelIndex, STRING); stock EF_ModelFrames(modelIndex) - return engfunc(EngFunc_ModelFrames, modelIndex) + return engfunc(EngFunc_ModelFrames, modelIndex); stock EF_SetSize(const STRING[]) - return engfunc(EngFunc_SetSize, STRING) + return engfunc(EngFunc_SetSize, STRING); stock EF_ChangeLevel(const S1[], const S2[]) - return engfunc(EngFunc_ChangeLevel, S1, S2) + return engfunc(EngFunc_ChangeLevel, S1, S2); stock EF_VecToYaw(const Float:VECTOR[3], &Float:returnValue) - return engfunc(EngFunc_VecToYaw, VECTOR, returnValue) + return engfunc(EngFunc_VecToYaw, VECTOR, returnValue); stock EF_VecToAngles(const Float:VECTORIN[3], const Float:VECTOROUT[3]) - return engfunc(EngFunc_VecToAngles, VECTORIN, VECTOROUT) + return engfunc(EngFunc_VecToAngles, VECTORIN, VECTOROUT); stock EF_MoveToOrigin(const ENTITY, const Float:GOAL[3], const Float:DISTANCE, const MOVETYPE) - return engfunc(EngFunc_MoveToOrigin, ENTITY, GOAL, DISTANCE, MOVETYPE) + return engfunc(EngFunc_MoveToOrigin, ENTITY, GOAL, DISTANCE, MOVETYPE); stock EF_ChangeYaw(const ENTITY) - return engfunc(EngFunc_ChangeYaw, ENTITY) + return engfunc(EngFunc_ChangeYaw, ENTITY); stock EF_ChangePitch(const ENTITY) - return engfunc(EngFunc_ChangePitch, ENTITY) + return engfunc(EngFunc_ChangePitch, ENTITY); stock EF_FindEntityByString(const STARTSEARCHAFTER, const FIELD[], const VALUE[]) - return engfunc(EngFunc_FindEntityByString, STARTSEARCHAFTER, FIELD, VALUE) + return engfunc(EngFunc_FindEntityByString, STARTSEARCHAFTER, FIELD, VALUE); stock EF_GetEntityIllum(const ENTITY) - return engfunc(EngFunc_GetEntityIllum, ENTITY) + return engfunc(EngFunc_GetEntityIllum, ENTITY); stock EF_FindEntityInSphere(const STARTSEARCHAFTER, const Float:ORIGIN[3], Float:radius) - return engfunc(EngFunc_FindEntityInSphere, STARTSEARCHAFTER, ORIGIN, radius) + return engfunc(EngFunc_FindEntityInSphere, STARTSEARCHAFTER, ORIGIN, radius); stock EF_FindClientInPVS(const CLIENT) - return engfunc(EngFunc_FindClientInPVS, CLIENT) + return engfunc(EngFunc_FindClientInPVS, CLIENT); stock EF_EntitiesInPVS(const CLIENT) - return engfunc(EngFunc_EntitiesInPVS, CLIENT) + return engfunc(EngFunc_EntitiesInPVS, CLIENT); stock EF_MakeVectors(const Float:VECTOR[3]) - return engfunc(EngFunc_MakeVectors, VECTOR) + return engfunc(EngFunc_MakeVectors, VECTOR); stock EF_AngleVectors(const Float:VECTOR[3], Float:forward_[3], Float:right[3], Float:up[3]) - return engfunc(EngFunc_AngleVectors, VECTOR, forward_, right, up) + return engfunc(EngFunc_AngleVectors, VECTOR, forward_, right, up); stock EF_CreateEntity() - return engfunc(EngFunc_CreateEntity) + return engfunc(EngFunc_CreateEntity); stock EF_RemoveEntity(const ENTITY) - return engfunc(EngFunc_RemoveEntity, ENTITY) + return engfunc(EngFunc_RemoveEntity, ENTITY); stock EF_CreateNamedEntity(const CLASSNAME) - return engfunc(EngFunc_CreateNamedEntity, CLASSNAME) + return engfunc(EngFunc_CreateNamedEntity, CLASSNAME); stock EF_MakeStatic(const ENTITY) - return engfunc(EngFunc_MakeStatic, ENTITY) + return engfunc(EngFunc_MakeStatic, ENTITY); stock EF_EntIsOnFloor(const ENTITY) - return engfunc(EngFunc_EntIsOnFloor, ENTITY) + return engfunc(EngFunc_EntIsOnFloor, ENTITY); stock EF_DropToFloor(const ENTITY) - return engfunc(EngFunc_DropToFloor, ENTITY) + return engfunc(EngFunc_DropToFloor, ENTITY); stock EF_WalkMove(const ENTITY, Float:yaw, Float:distance, iMode) - return engfunc(EngFunc_WalkMove, ENTITY, yaw, distance, iMode) + return engfunc(EngFunc_WalkMove, ENTITY, yaw, distance, iMode); stock EF_SetOrigin(const ENTITY, const Float:ORIGIN[3]) - return engfunc(EngFunc_SetOrigin, ENTITY, ORIGIN) + return engfunc(EngFunc_SetOrigin, ENTITY, ORIGIN); stock EF_EmitSound(const ENTITY, channel, const SAMPLE[], Float:volume, Float:attenuation, fFlags, pitch) - return engfunc(EngFunc_EmitSound, ENTITY, channel, SAMPLE, volume, attenuation, fFlags, pitch) + return engfunc(EngFunc_EmitSound, ENTITY, channel, SAMPLE, volume, attenuation, fFlags, pitch); stock EF_EmitAmbientSound(const ENTITY, Float:pos[3], const SAMPLE[], Float:volume, Float:attenuation, fFlags, pitch) - return engfunc(EngFunc_EmitAmbientSound, ENTITY, pos, SAMPLE, volume, attenuation, fFlags, pitch) + return engfunc(EngFunc_EmitAmbientSound, ENTITY, pos, SAMPLE, volume, attenuation, fFlags, pitch); stock EF_TraceLine(const Float:V1[3], const Float:V2[3], fNoMonsters, const ENT_TO_SKIP) - return engfunc(EngFunc_TraceLine, V1, V2, fNoMonsters, ENT_TO_SKIP) + return engfunc(EngFunc_TraceLine, V1, V2, fNoMonsters, ENT_TO_SKIP); stock EF_TraceToss(const ENTITY, const ENTITY_TO_IGNORE) - return engfunc(EngFunc_TraceToss, ENTITY, ENTITY_TO_IGNORE) + return engfunc(EngFunc_TraceToss, ENTITY, ENTITY_TO_IGNORE); stock EF_TraceMonsterHull(const ENTITY, const Float:V1[3], const Float:V2[3], fNoMonsters, const ENTITY_TO_SKIP) - return engfunc(EngFunc_TraceMonsterHull, ENTITY, V1, V2, fNoMonsters, ENTITY_TO_SKIP) + return engfunc(EngFunc_TraceMonsterHull, ENTITY, V1, V2, fNoMonsters, ENTITY_TO_SKIP); stock EF_TraceHull(const Float:V1[3], const Float:V2[3], fNoMonsters, hullNumber, const ENTITY_TO_SKIP) - return engfunc(EngFunc_TraceHull, V1, V2, fNoMonsters, hullNumber, ENTITY_TO_SKIP) + return engfunc(EngFunc_TraceHull, V1, V2, fNoMonsters, hullNumber, ENTITY_TO_SKIP); stock EF_TraceModel(const Float:V1[3], const Float:V2[3], hullNumber, const ENTITY) - return engfunc(EngFunc_TraceModel, V1, V2, hullNumber, ENTITY) + return engfunc(EngFunc_TraceModel, V1, V2, hullNumber, ENTITY); stock EF_TraceTexture(const TEXTURE_ENTITY, const Float:V1[3], const Float:V2[3]) - return engfunc(EngFunc_TraceTexture, TEXTURE_ENTITY, V1, V2) + return engfunc(EngFunc_TraceTexture, TEXTURE_ENTITY, V1, V2); stock EF_TraceSphere(const Float:V1[3], const Float:V2[3], fNoMonsters, Float:radius, const ENTITY_TO_SKIP) - return engfunc(EngFunc_TraceSphere, V1, V2, fNoMonsters, radius, ENTITY_TO_SKIP) + return engfunc(EngFunc_TraceSphere, V1, V2, fNoMonsters, radius, ENTITY_TO_SKIP); stock EF_GetAimVector(const ENTITY, Float:speed, Float:returnVector[3]) - return engfunc(EngFunc_GetAimVector, ENTITY, speed, returnVector) + return engfunc(EngFunc_GetAimVector, ENTITY, speed, returnVector); stock EF_ParticleEffect(const Float:ORIGIN[3], const Float:DIRECTION[3], Float:color, Float:count) - return engfunc(EngFunc_ParticleEffect, ORIGIN, DIRECTION, color, count) + return engfunc(EngFunc_ParticleEffect, ORIGIN, DIRECTION, color, count); stock EF_LightStyle(style, val[]) - return engfunc(EngFunc_LightStyle, style, val) + return engfunc(EngFunc_LightStyle, style, val); stock EF_DecalIndex(const NAME[]) - return engfunc(EngFunc_DecalIndex, NAME) + return engfunc(EngFunc_DecalIndex, NAME); stock EF_PointContents(const Float:VECTOR[3]) - return engfunc(EngFunc_PointContents, VECTOR) + return engfunc(EngFunc_PointContents, VECTOR); stock EF_FreeEntPrivateData(const ENTITY) - return engfunc(EngFunc_FreeEntPrivateData, ENTITY) + return engfunc(EngFunc_FreeEntPrivateData, ENTITY); stock EF_SzFromIndex(iString) - return engfunc(EngFunc_SzFromIndex, iString) + return engfunc(EngFunc_SzFromIndex, iString); stock EF_AllocString(const STRING[]) - return engfunc(EngFunc_AllocString, STRING) + return engfunc(EngFunc_AllocString, STRING); stock EF_RegUserMsg(const NAME[], iSize) - return engfunc(EngFunc_RegUserMsg, NAME, iSize) + return engfunc(EngFunc_RegUserMsg, NAME, iSize); stock EF_AnimationAutomove(const ENTITY, Float:flTime) - return engfunc(EngFunc_AnimationAutomove, ENTITY, flTime) + return engfunc(EngFunc_AnimationAutomove, ENTITY, flTime); stock EF_GetBonePosition(const ENTITY, iBone, Float:origin[3], Float:angles[3]) - return engfunc(EngFunc_GetBonePosition, ENTITY, iBone, origin, angles) + return engfunc(EngFunc_GetBonePosition, ENTITY, iBone, origin, angles); stock EF_GetAttachment(const ENTITY, iAttachment, Float:origin[3], Float:angles[3]) - return engfunc(EngFunc_GetAttachment, ENTITY, iAttachment, origin, angles) + return engfunc(EngFunc_GetAttachment, ENTITY, iAttachment, origin, angles); stock EF_SetView(const CLIENT, const VIEW_ENTITY) - return engfunc(EngFunc_SetView, CLIENT, VIEW_ENTITY) + return engfunc(EngFunc_SetView, CLIENT, VIEW_ENTITY); stock EF_Time(&Float:returnValue) - return engfunc(EngFunc_Time, returnValue) + return engfunc(EngFunc_Time, returnValue); stock EF_CrosshairAngle(const CLIENT, Float:pitch, Float:yaw) - return engfunc(EngFunc_CrosshairAngle, CLIENT, pitch, yaw) + return engfunc(EngFunc_CrosshairAngle, CLIENT, pitch, yaw); stock EF_FadeClientVolume(const ENTITY, fadePercent, fadeOutSeconds, holdTime, fadeInSeconds) - return engfunc(EngFunc_FadeClientVolume, ENTITY, fadePercent, fadeOutSeconds, holdTime, fadeInSeconds) + return engfunc(EngFunc_FadeClientVolume, ENTITY, fadePercent, fadeOutSeconds, holdTime, fadeInSeconds); stock EF_SetClientMaxspeed(const ENTITY, Float:newMaxspeed) - return engfunc(EngFunc_SetClientMaxspeed, ENTITY, newMaxspeed) + return engfunc(EngFunc_SetClientMaxspeed, ENTITY, newMaxspeed); stock EF_CreateFakeClient(const NETNAME[]) - return engfunc(EngFunc_CreateFakeClient, NETNAME) + return engfunc(EngFunc_CreateFakeClient, NETNAME); stock EF_RunPlayerMove(const FAKECLIENT, const Float:VIEWANGLES[3], Float:forwardmove, Float:sidemove, Float:upmove, buttons, impulse, msec) - return engfunc(EngFunc_RunPlayerMove, FAKECLIENT, VIEWANGLES, forwardmove, sidemove, upmove, buttons, impulse, msec) + return engfunc(EngFunc_RunPlayerMove, FAKECLIENT, VIEWANGLES, forwardmove, sidemove, upmove, buttons, impulse, msec); stock EF_NumberOfEntities() - return engfunc(EngFunc_NumberOfEntities) + return engfunc(EngFunc_NumberOfEntities); stock EF_StaticDecal(const Float:ORIGIN[3], decalIndex, entityIndex, modelIndex) - return engfunc(EngFunc_StaticDecal, ORIGIN, decalIndex, entityIndex, modelIndex) + return engfunc(EngFunc_StaticDecal, ORIGIN, decalIndex, entityIndex, modelIndex); stock EF_PrecacheGeneric(const STRING[]) - return engfunc(EngFunc_PrecacheGeneric, STRING) + return engfunc(EngFunc_PrecacheGeneric, STRING); stock EF_BuildSoundMSG(const ENTITY, channel, const SAMPLE[], Float:volume, Float:attenuation, fFlags, pitch, msg_dest, msg_type, const Float:ORIGIN[3], const ED) - return engfunc(EngFunc_BuildSoundMsg, ENTITY, channel, SAMPLE, volume, attenuation, fFlags, pitch, msg_dest, msg_type, ORIGIN, ED) + return engfunc(EngFunc_BuildSoundMsg, ENTITY, channel, SAMPLE, volume, attenuation, fFlags, pitch, msg_dest, msg_type, ORIGIN, ED); stock EF_GetPhysicsKeyValue(const CLIENT, const KEY[]) - return engfunc(EngFunc_GetPhysicsKeyValue, CLIENT, KEY) + return engfunc(EngFunc_GetPhysicsKeyValue, CLIENT, KEY); stock EF_SetPhysicsKeyValue(const CLIENT, const KEY[], const VALUE[]) - return engfunc(EngFunc_SetPhysicsKeyValue, CLIENT, KEY, VALUE) + return engfunc(EngFunc_SetPhysicsKeyValue, CLIENT, KEY, VALUE); stock EF_GetPhysicsInfoString(const CLIENT, returnString[], maxLength) - return engfunc(EngFunc_GetPhysicsInfoString, CLIENT, returnString, maxLength) + return engfunc(EngFunc_GetPhysicsInfoString, CLIENT, returnString, maxLength); stock EF_PrecacheEvent(type, const STRING[]) - return engfunc(EngFunc_PrecacheEvent, type, STRING) + return engfunc(EngFunc_PrecacheEvent, type, STRING); stock EF_PlaybackEvent(flags, const INVOKER, eventindex, Float:delay, Float:origin[3], Float:angles[3], Float:fparam1, Float:fparam2, iparam1, iparam2, bparam1, bparam2) - return engfunc(EngFunc_PlaybackEvent, flags, INVOKER, eventindex, delay, origin, angles, fparam1, fparam2, iparam1, iparam2, bparam1, bparam2) + return engfunc(EngFunc_PlaybackEvent, flags, INVOKER, eventindex, delay, origin, angles, fparam1, fparam2, iparam1, iparam2, bparam1, bparam2); stock EF_CheckVisibility(const ENTITY, set) - return engfunc(EngFunc_CheckVisibility, ENTITY, set) + return engfunc(EngFunc_CheckVisibility, ENTITY, set); stock EF_GetCurrentPlayer() - return engfunc(EngFunc_GetCurrentPlayer) + return engfunc(EngFunc_GetCurrentPlayer); stock EF_CanSkipPlayer(const PLAYER) - return engfunc(EngFunc_CanSkipPlayer, PLAYER) + return engfunc(EngFunc_CanSkipPlayer, PLAYER); stock EF_SetGroupMask(mask, op) - return engfunc(EngFunc_SetGroupMask, mask, op) + return engfunc(EngFunc_SetGroupMask, mask, op); stock EF_GetClientListening(receiver, sender) return engfunc(EngFunc_GetClientListening, receiver, sender); stock EF_SetClientListening(receiver, sender, bool:listen) return engfunc(EngFunc_SetClientListening, receiver, sender, listen); stock EF_MessageBegin(msg_dest, msg_type, const Float:ORIGIN[3], const ED) - return engfunc(EngFunc_MessageBegin, msg_dest, msg_type, ORIGIN, ED) + return engfunc(EngFunc_MessageBegin, msg_dest, msg_type, ORIGIN, ED); stock EF_WriteCoord(Float:value) - return engfunc(EngFunc_WriteCoord, value) + return engfunc(EngFunc_WriteCoord, value); stock EF_WriteAngle(Float:value) - return engfunc(EngFunc_WriteAngle, value) + return engfunc(EngFunc_WriteAngle, value); stock EF_InfoKeyValue(const INFOBUFFER, const KEY[], returnValue[], maxLength) - return engfunc(EngFunc_InfoKeyValue, INFOBUFFER, KEY, returnValue, maxLength) + return engfunc(EngFunc_InfoKeyValue, INFOBUFFER, KEY, returnValue, maxLength); stock EF_SetKeyValue(const INFOBUFFER, const KEY[], const VALUE[]) - return engfunc(EngFunc_SetKeyValue, INFOBUFFER, KEY, VALUE) + return engfunc(EngFunc_SetKeyValue, INFOBUFFER, KEY, VALUE); stock EF_SetClientKeyValue(const ID, const INFOBUFFER, const KEY[], const VALUE[]) - return engfunc(EngFunc_SetClientKeyValue, ID, INFOBUFFER, KEY, VALUE) + return engfunc(EngFunc_SetClientKeyValue, ID, INFOBUFFER, KEY, VALUE); stock EF_CreateInstBaseline(CLASSNAME, baseline) - return engfunc(EngFunc_CreateInstBaseline, CLASSNAME, baseline) + return engfunc(EngFunc_CreateInstBaseline, CLASSNAME, baseline); // Returns pointer to info buffer that can be used with the INFOBUFFER param // of EF_InfoKeyValue, EF_SetKeyValue, and EF_SetClientKeyValue stock EF_GetInfoKeyBuffer(const ENTITY) - return engfunc(EngFunc_GetInfoKeyBuffer, ENTITY) + return engfunc(EngFunc_GetInfoKeyBuffer, ENTITY); stock EF_ClientPrintf(const ENTITY, const printType, const MESSAGE[]) - return engfunc(EngFunc_ClientPrintf, ENTITY, printType, MESSAGE) + return engfunc(EngFunc_ClientPrintf, ENTITY, printType, MESSAGE); // DLLFuncs stock DF_GameInit() - return dllfunc(DLLFunc_GameInit) + return dllfunc(DLLFunc_GameInit); stock DF_Spawn(const ENTITY) - return dllfunc(DLLFunc_Spawn, ENTITY) + return dllfunc(DLLFunc_Spawn, ENTITY); stock DF_Think(const ENTITY) - return dllfunc(DLLFunc_Think, ENTITY) + return dllfunc(DLLFunc_Think, ENTITY); stock DF_Use(const ENT_Used, const ENT_User) - return dllfunc(DLLFunc_Use, ENT_Used, ENT_User) + return dllfunc(DLLFunc_Use, ENT_Used, ENT_User); stock DF_Touch(const ENT_Touched, const ENT_Toucher) - return dllfunc(DLLFunc_Touch, ENT_Touched, ENT_Toucher) + return dllfunc(DLLFunc_Touch, ENT_Touched, ENT_Toucher); stock DF_Blocked(const ENT_Blocked, const ENT_Other) - return dllfunc(DLLFunc_Blocked, ENT_Blocked, ENT_Other) + return dllfunc(DLLFunc_Blocked, ENT_Blocked, ENT_Other); stock DF_SetAbsBox(const ENTITY) - return dllfunc(DLLFunc_SetAbsBox, ENTITY) + return dllfunc(DLLFunc_SetAbsBox, ENTITY); stock DF_ClientConnect(const ENTITY, const NAME[], const ADDRESS[], RejectReason[128]) - return dllfunc(DLLFunc_ClientConnect, ENTITY, NAME, ADDRESS, RejectReason) + return dllfunc(DLLFunc_ClientConnect, ENTITY, NAME, ADDRESS, RejectReason); stock DF_ClientDisconnect(const ENTITY) - return dllfunc(DLLFunc_ClientDisconnect, ENTITY) + return dllfunc(DLLFunc_ClientDisconnect, ENTITY); stock DF_ClientKill(const ENTITY) - return dllfunc(DLLFunc_ClientKill, ENTITY) + return dllfunc(DLLFunc_ClientKill, ENTITY); stock DF_ClientPutInServer(const ENTITY) - return dllfunc(DLLFunc_ClientPutInServer, ENTITY) + return dllfunc(DLLFunc_ClientPutInServer, ENTITY); stock DF_ClientCommand(const ENTITY) - return dllfunc(DLLFunc_ClientCommand, ENTITY) + return dllfunc(DLLFunc_ClientCommand, ENTITY); stock DF_ServerDeactivate() - return dllfunc(DLLFunc_ServerDeactivate) + return dllfunc(DLLFunc_ServerDeactivate); stock DF_PlayerPreThink(const ENTITY) - return dllfunc(DLLFunc_PlayerPreThink, ENTITY) + return dllfunc(DLLFunc_PlayerPreThink, ENTITY); stock DF_PlayerPostThink(const ENTITY) - return dllfunc(DLLFunc_PlayerPostThink, ENTITY) + return dllfunc(DLLFunc_PlayerPostThink, ENTITY); stock DF_StartFrame() - return dllfunc(DLLFunc_StartFrame) + return dllfunc(DLLFunc_StartFrame); stock DF_ParmsNewLevel() - return dllfunc(DLLFunc_ParmsNewLevel) + return dllfunc(DLLFunc_ParmsNewLevel); stock DF_ParmsChangeLevel() - return dllfunc(DLLFunc_ParmsChangeLevel) + return dllfunc(DLLFunc_ParmsChangeLevel); stock DF_GetGameDescription() - return dllfunc(DLLFunc_GetGameDescription) + return dllfunc(DLLFunc_GetGameDescription); stock DF_SpectatorConnect(const ENTITY) - return dllfunc(DLLFunc_SpectatorConnect, ENTITY) + return dllfunc(DLLFunc_SpectatorConnect, ENTITY); stock DF_SpectatorDisconnect(const ENTITY) - return dllfunc(DLLFunc_SpectatorDisconnect, ENTITY) + return dllfunc(DLLFunc_SpectatorDisconnect, ENTITY); stock DF_SpectatorThink(const ENTITY) - return dllfunc(DLLFunc_SpectatorThink, ENTITY) + return dllfunc(DLLFunc_SpectatorThink, ENTITY); stock DF_Sys_Error(const ERROR_STRING[]) - return dllfunc(DLLFunc_Sys_Error, ERROR_STRING) + return dllfunc(DLLFunc_Sys_Error, ERROR_STRING); stock DF_PM_FindTextureType(name[]) - return dllfunc(DLLFunc_PM_FindTextureType, name) + return dllfunc(DLLFunc_PM_FindTextureType, name); stock DF_RegisterEncoders() - return dllfunc(DLLFunc_RegisterEncoders) + return dllfunc(DLLFunc_RegisterEncoders); stock DF_GetHullBounds(hullnumber, Float:mins[3], Float:maxs[3]) - return dllfunc(DLLFunc_GetHullBounds, hullnumber, mins, maxs) + return dllfunc(DLLFunc_GetHullBounds, hullnumber, mins, maxs); stock DF_CreateInstBaselines() - return dllfunc(DLLFunc_CreateInstBaselines) + return dllfunc(DLLFunc_CreateInstBaselines); stock DF_pfnAllowLagCompensation() - return dllfunc(DLLFunc_pfnAllowLagCompensation) + return dllfunc(DLLFunc_pfnAllowLagCompensation); stock DF_MetaFunc_CallGameEntity(const STRING[], const ENTITY) - return dllfunc(MetaFunc_CallGameEntity, STRING, ENTITY) + return dllfunc(MetaFunc_CallGameEntity, STRING, ENTITY); stock DF_ClientUserInfoChanged(const IDPLAYER) - return dllfunc(DLLFunc_ClientUserInfoChanged, IDPLAYER) + return dllfunc(DLLFunc_ClientUserInfoChanged, IDPLAYER); -stock DF_UpdateClientData(const ENTITY, sendweapons, const cd = 0) - return dllfunc(DLLFunc_UpdateClientData, ENTITY, sendweapons, cd) -stock DF_AddToFullPack(const STATE = 0, e, ENT, HOST, hostflags, player, set) - return dllfunc(DLLFunc_AddToFullPack, STATE, e, ENT, HOST, hostflags, player, set) -stock DF_CmdStart(const PLAYER, const CMD = 0, randomSeed) - return dllfunc(DLLFunc_CmdStart, PLAYER, CMD, randomSeed) +stock DF_UpdateClientData(const ENTITY, sendweapons, const cd/* = 0*/) + return dllfunc(DLLFunc_UpdateClientData, ENTITY, sendweapons, cd); +stock DF_AddToFullPack(const STATE/* = 0*/, e, ENT, HOST, hostflags, player, set) + return dllfunc(DLLFunc_AddToFullPack, STATE, e, ENT, HOST, hostflags, player, set); +stock DF_CmdStart(const PLAYER, const CMD/* = 0*/, randomSeed) + return dllfunc(DLLFunc_CmdStart, PLAYER, CMD, randomSeed); stock DF_CmdEnd(const PLAYER) - return dllfunc(DLLFunc_CmdEnd, PLAYER) + return dllfunc(DLLFunc_CmdEnd, PLAYER); stock DF_CreateBaseline(PLAYER, eIndex, baseline, playerModelIndex, Float:playerMins[3], Float:playerMaxs[3]) - return dllfunc(DLLFunc_CreateBaseline, PLAYER, eIndex, baseline, playerModelIndex, playerMins, playerMaxs) + return dllfunc(DLLFunc_CreateBaseline, PLAYER, eIndex, baseline, playerModelIndex, playerMins, playerMaxs); diff --git a/plugins/include/ns.inc b/plugins/include/ns.inc index 1b29d533..6817bc6c 100755 --- a/plugins/include/ns.inc +++ b/plugins/include/ns.inc @@ -32,7 +32,7 @@ forward client_built(idPlayer,idStructure,type,impulse); native ns_is_combat(); /* Sends a popup to a player. Set target to 0 to send to everybody. Message length is 180 characters. The last parameter, if set to 1, will only display when the player has cl_autohelp set to 1. */ -native ns_popup(target,const szMsg[180],ah=0) +native ns_popup(target,const szMsg[180],ah=0); /* Sets a player model. Omit the second parameter to return to default. Note: This does *not* change back on death, team switch, gestations, etc. */ diff --git a/plugins/include/ns2amx.inc b/plugins/include/ns2amx.inc index 905969a4..e50cf2df 100755 --- a/plugins/include/ns2amx.inc +++ b/plugins/include/ns2amx.inc @@ -15,249 +15,251 @@ #include // ns specifics stock is_entity(id) - return is_valid_ent(id) + return is_valid_ent(id); /* The end of the native is buffered incase the plugin is including an NS_VERSION (no longer supported), ignore it */ stock get_build(classname[], value, number=0,{Float,Sql,Result,_}:...) - return ns_get_build(classname, value, number) + return ns_get_build(classname, value, number); stock get_private_i(index, offset, linuxdiff=5) - return get_pdata_int(index, offset, linuxdiff) + return get_pdata_int(index, offset, linuxdiff); stock set_private_i(index, offset, value, linuxdiff=5) { - return set_pdata_int(index, offset, value, linuxdiff) + return set_pdata_int(index, offset, value, linuxdiff); } stock Float:get_private_f(index, offset, linuxdiff=5) { - return get_pdata_float(index, offset, linuxdiff) + return get_pdata_float(index, offset, linuxdiff); } stock set_private_f(index, offset, Float:value, linuxdiff=5) { - return set_pdata_float(index, offset, value, linuxdiff) + return set_pdata_float(index, offset, value, linuxdiff); } stock make_string(value[]) - return engfunc(EngFunc_AllocString,value) + return engfunc(EngFunc_AllocString,value); stock string(value, ret[]) { - new szString[128] // gah... - engfunc(EngFunc_SzFromIndex,value,szString,127) - copy(ret,szString,127) + new szString[128]; + engfunc(EngFunc_SzFromIndex,value,szString,127); + copy(ret,127,szString); } stock gpgobals_time() - return halflife_time() + return floatround(halflife_time()); stock Float:get_range(ida, idb) - return entity_range(ida, idb) + return entity_range(ida, idb); stock supercede() - return 0 + return 0; stock register_clientkill() - return 0 + return 0; stock register_changelvl() - return 0 + return 0; stock register_msgblock(msgName[]) - return set_msg_block(get_user_msgid(msgName), BLOCK_SET) + return set_msg_block(get_user_msgid(msgName), BLOCK_SET); stock register_msgedit(msgName[], cmd[]) - return register_message(get_user_msgid(msgName), cmd) + return register_message(get_user_msgid(msgName), cmd); stock register_playback(event, cmd[]) - return 0 + return 0; stock get_spawn(type, number=0, Float:ret[3]) - return ns_get_spawn(type, number, ret) + return ns_get_spawn(type, number, ret); stock has_weapon(index, weapon, setweapon=-1) - return ns_has_weapon(index, weapon, setweapon) + return ns_has_weapon(index, weapon, setweapon); stock gpglobals_v(type, Float:ret[3]) { - new v_type=0 + new v_type=0; switch (type) { case 1: - v_type = GL_v_forward + v_type = GL_v_forward; case 2: - v_type = GL_v_right + v_type = GL_v_right; case 3: - v_type = GL_v_up + v_type = GL_v_up; } if (!v_type) - return 0 - return get_global_vector(v_type, ret) + return 0; + return get_global_vector(v_type, ret); } stock pev_i(_index,_field) - return pev(_index,_field) + return pev(_index,_field); stock set_pev_i(_index, _field, _val) - return set_pev(_index,_field,_val) + return set_pev(_index,_field,_val); stock Float:pev_f(_index,_field) { - new Float:f - pev(_index,_field,f) - return f + new Float:f; + pev(_index,_field,f); + return f; } stock set_pev_f(_index,_field,Float:_val) - return set_pev(_index,_field,_val) + return set_pev(_index,_field,_val); stock msg_args() - return get_msg_args() + return get_msg_args(); stock Float:msg_loc(vec) { - new Float:Ret[3] - get_msg_origin(Ret) + new Float:Ret[3]; + get_msg_origin(Ret); if (vec < 0 || vec > 3) - return float(0) + return float(0); else - return Ret[vec] + return Ret[vec]; + + return 0.0; // make compiler happy! } stock msg_dest() - return 0 + return 0; stock msg_type() - return 0 + return 0; stock msg_name() - return 0 + return 0; stock msg_set_s(number, value[]) - return set_msg_arg_string(number, value) + return set_msg_arg_string(number, value); stock msg_set_f(number, Float:value) - return set_msg_arg_float(number, get_msg_argtype(number), value) + return set_msg_arg_float(number, get_msg_argtype(number), value); stock msg_set_i(number, value) - return set_msg_arg_int(number, get_msg_argtype(number), value) + return set_msg_arg_int(number, get_msg_argtype(number), value); stock msg_data_type(value) - return get_msg_arg_type(value) + return get_msg_argtype(value); stock msg_strdata(value) - return 0 + return 0; stock msg_data(value, ...) { - return (0*value) + return (0*value); } stock get_filename(szFile[], len=-1) { - new name[16], version[16], author[16], status[16] - new res = get_plugin(0, szFile, len, name, 16, version, 16, author, 16, status, 16) - return res + new name[16], version[16], author[16], status[16]; + new res = get_plugin(0, szFile, len, name, 16, version, 16, author, 16, status, 16); + return res; } stock get_speedchange(id) - return ns_get_speedchange(id) + return ns_get_speedchange(id); stock set_speedchange(id, speed) - return ns_set_speedchange(id,speed) + return ns_set_speedchange(id,speed); stock get_maxspeed(id) - return ns_get_maxspeed(id) + return ns_get_maxspeed(id); stock set_player_model(id, model[]="") - return ns_set_player_model(id, model) + return ns_set_player_model(id, model); stock set_player_skin(id, skin=-1) - return ns_set_player_skin(id, skin) + return ns_set_player_skin(id, skin); stock set_player_body(id, body=-1) - return ns_set_player_body(id, body) + return ns_set_player_body(id, body); stock ns2amx_version() - return 0 + return 0; stock set_kvhandled() - return 0 + return 0; stock ns2amx_getammo(id,Weapon) - return ns_get_weap_reserve(id, Weapon) + return ns_get_weap_reserve(id, Weapon); stock ns2amx_setammo(id,Weapon,Value) - return ns_set_weap_reserve(id, Weapon, Value) + return ns_set_weap_reserve(id, Weapon, Value); stock ns2amx_giveitem(id,svClassname[]) - return ns_give_item(id, svClassname) + return ns_give_item(id, svClassname); stock ns2amx_moveto(idMoved,idDest) { - new Float:origin[3] - entity_get_vector(idDest, EV_VEC_origin,origin) - entity_set_origin(idMoved, origin) - return 1 + new Float:origin[3]; + entity_get_vector(idDest, EV_VEC_origin,origin); + entity_set_origin(idMoved, origin); + return 1; } /* Returns whether or not the player has the MASK_DIGESTING flag set. */ stock ns2amx_isdigesting(id) - return ns_get_mask(id,MASK_DIGESTING) + return ns_get_mask(id,MASK_DIGESTING); /* Returns total # of active hives. */ stock ns2amx_gethives() - return ns_get_build("team_hive",1) + return ns_get_build("team_hive",1); /* Returns 1 if the two entities are within the given range. */ stock ns2amx_inrange(ida,idb,range) { if (entity_range(ida,idb) <= range) - return 1 - return 0 + return 1; + return 0; } stock ns2amx_nspopup(id,svMessage[190]) { - new szMessage[180] - copy(szMessage,179,svMessage) - return ns_popup(id, szMessage) + new szMessage[180]; + copy(szMessage,179,svMessage); + return ns_popup(id, szMessage); } stock ns2amx_setres(id,value) - return ns_set_res(id, float(value)) + return ns_set_res(id, float(value)); stock ns2amx_getenergy(id) - return floatround(ns_get_energy(id)) + return floatround(ns_get_energy(id)); stock ns2amx_setenergy(id,energy) - return ns_set_energy(id, float(energy)) + return ns_set_energy(id, float(energy)); stock ns2amx_getjpfuel(id) - return floatround(ns_get_jpfuel(id)) + return floatround(ns_get_jpfuel(id)); stock ns2amx_setjpfuel(id,fuel) - return ns_set_jpfuel(id, float(fuel)) + return ns_set_jpfuel(id, float(fuel)); stock get_mask(id,mask) - return ns_get_mask(id, mask) + return ns_get_mask(id, mask); stock set_mask(id,mask,value) - return ns_set_mask(id,mask,value) + return ns_set_mask(id,mask,value); stock get_special(id,mask) { if (pev(id,pev_iuser4) & mask) - return 1 - return 0 + return 1; + return 0; } stock get_res(id) - return floatround(ns_get_res(id)) + return floatround(ns_get_res(id)); stock get_class(id) - return ns_get_class(id) + return ns_get_class(id); stock is_combat() - return ns_is_combat() + return ns_is_combat(); diff --git a/plugins/include/nvault.inc b/plugins/include/nvault.inc index ba6523ef..9deb2af3 100755 --- a/plugins/include/nvault.inc +++ b/plugins/include/nvault.inc @@ -34,7 +34,7 @@ native nvault_get(vault, const key[], ...); /* Looks up a vault value for full information * Returns 0 if the entry is not found */ -native nvault_lookup(vault, const key[], value[], maxlen, ×tamp) +native nvault_lookup(vault, const key[], value[], maxlen, ×tamp); /* Sets a vault value (with current timestamp) */ native nvault_set(vault, const key[], const value[]); diff --git a/plugins/include/sqlx.inc b/plugins/include/sqlx.inc index 199686bf..82230fa4 100644 --- a/plugins/include/sqlx.inc +++ b/plugins/include/sqlx.inc @@ -245,15 +245,15 @@ stock SQL_SimpleQuery(Handle:db, const query[], error[]="", maxlength=0, &rows=0 if (!SQL_Execute(hQuery)) { SQL_QueryError(hQuery, error, maxlength); - SQL_FreeHandle(hQuery) + SQL_FreeHandle(hQuery); return 0; } - rows = SQL_NumResults(hQuery) + rows = SQL_NumResults(hQuery); SQL_FreeHandle(hQuery); - return 1 + return 1; } /** @@ -263,22 +263,22 @@ stock SQL_SimpleQuery(Handle:db, const query[], error[]="", maxlength=0, &rows=0 stock SQL_SimpleQueryFmt(Handle:db, error[]="", maxlength=0, &rows=0, const fmt[], ...) { static query_buf[2048]; - vformat(query_buf, 2047, fmt, 6) + vformat(query_buf, 2047, fmt, 6); new Handle:hQuery = SQL_PrepareQuery(db, "%s", query_buf); if (!SQL_Execute(hQuery)) { SQL_QueryError(hQuery, error, maxlength); - SQL_FreeHandle(hQuery) + SQL_FreeHandle(hQuery); return 0; } - rows = SQL_NumResults(hQuery) + rows = SQL_NumResults(hQuery); SQL_FreeHandle(hQuery); - return 1 + return 1; } /** @@ -287,46 +287,46 @@ stock SQL_SimpleQueryFmt(Handle:db, error[]="", maxlength=0, &rows=0, const fmt[ */ stock SQL_QueryAndIgnore(Handle:db, const queryfmt[], {Float,_}:...) { - static query[4096] - new Handle:hQuery - new ret + static query[4096]; + new Handle:hQuery; + new ret; - vformat(query, sizeof(query)-1, queryfmt, 3) + vformat(query, sizeof(query)-1, queryfmt, 3); hQuery = SQL_PrepareQuery(db, "%s", query); if (SQL_Execute(hQuery)) { - ret = SQL_AffectedRows(hQuery) + ret = SQL_AffectedRows(hQuery); } else { - ret = -1 + ret = -1; } - SQL_FreeHandle(hQuery) + SQL_FreeHandle(hQuery); - return ret + return ret; } stock Handle:SQL_MakeStdTuple() { - static host[64], user[32], pass[32], db[128] - static get_type[12], set_type[12] + static host[64], user[32], pass[32], db[128]; + static get_type[12], set_type[12]; - get_cvar_string("amx_sql_host", host, 63) - get_cvar_string("amx_sql_user", user, 31) - get_cvar_string("amx_sql_pass", pass, 31) - get_cvar_string("amx_sql_type", set_type, 11) - get_cvar_string("amx_sql_db", db, 127) + get_cvar_string("amx_sql_host", host, 63); + get_cvar_string("amx_sql_user", user, 31); + get_cvar_string("amx_sql_pass", pass, 31); + get_cvar_string("amx_sql_type", set_type, 11); + get_cvar_string("amx_sql_db", db, 127); - SQL_GetAffinity(get_type, 12) + SQL_GetAffinity(get_type, 12); if (!equali(get_type, set_type)) { if (!SQL_SetAffinity(set_type)) { - log_amx("Failed to set affinity from %s to %s.", get_type, set_type) + log_amx("Failed to set affinity from %s to %s.", get_type, set_type); } } - return SQL_MakeDbTuple(host, user, pass, db) + return SQL_MakeDbTuple(host, user, pass, db); } diff --git a/plugins/include/string.inc b/plugins/include/string.inc index 0491bbcf..e8a958e0 100755 --- a/plugins/include/string.inc +++ b/plugins/include/string.inc @@ -232,7 +232,7 @@ stock replace_all(string[], len, const what[], const with[]) new with_len = strlen(with); new diff = strlen(what) - with_len; new total_len = strlen(string); - new temp_pos = 0 + new temp_pos = 0; while (replace(string[pos], len - pos, what, with) != 0) { diff --git a/plugins/include/tsfun.inc b/plugins/include/tsfun.inc index f0d04a44..f30fba16 100755 --- a/plugins/include/tsfun.inc +++ b/plugins/include/tsfun.inc @@ -66,7 +66,7 @@ native ts_setusercash( index, money ); native ts_getuserslots( index ); native ts_setuserslots( index, slots ); -native ts_getuserstate( index ) +native ts_getuserstate( index ); native ts_getuserwpn( index,&clip,&ammo,&mode,&extra ); native ts_getuserspace( index ); @@ -98,30 +98,30 @@ native ts_setpddata( knifeoffset ); // native ts_set_fuattack(id,Float:time,Float:damage); //! // Changes board message -native ts_set_message(id,message) +native ts_set_message(id,message); // Gets the message board message -native ts_get_message(id) +native ts_get_message(id); stock ts_is_normal(id) { - new msg = ts_get_message(id) + new msg = ts_get_message(id); if( (msg > 11) || (msg > 6 && msg < 10) ) return 1; return 0; } -stock ts_is_waiting(id) return (ts_get_message(id) == TSMSG_WAITING) -stock ts_is_dead(id) return (ts_get_message(id) == TSMSG_DEAD) -stock ts_is_killer(id) return (ts_get_message(id) == TSMSG_KILLER) -stock ts_is_demolition(id) return (ts_get_message(id) == TSMSG_DEMOLITION) -stock ts_is_specialist(id) return (ts_get_message(id) == TSMSG_SPECIALIST) -stock ts_is_unstoppable(id) return (ts_get_message(id) == TSMSG_UNSTOPPABLE) -stock ts_is_theone(id) return (ts_get_message(id) == TSMSG_THEONE) +stock ts_is_waiting(id) return (ts_get_message(id) == TSMSG_WAITING); +stock ts_is_dead(id) return (ts_get_message(id) == TSMSG_DEAD); +stock ts_is_killer(id) return (ts_get_message(id) == TSMSG_KILLER); +stock ts_is_demolition(id) return (ts_get_message(id) == TSMSG_DEMOLITION); +stock ts_is_specialist(id) return (ts_get_message(id) == TSMSG_SPECIALIST); +stock ts_is_unstoppable(id) return (ts_get_message(id) == TSMSG_UNSTOPPABLE); +stock ts_is_theone(id) return (ts_get_message(id) == TSMSG_THEONE); // Return one on true, 0 on false // UNAVAILABLE IN 1.70 native ts_has_superjump(id); //! native ts_has_fupowerup(id); //! -native ts_is_in_slowmo(id) +native ts_is_in_slowmo(id); // Get and set consecutive frags //UNAVAILABLE IN 1.70 @@ -132,23 +132,23 @@ native ts_is_in_slowmo(id) native ts_set_bullettrail(id,yesorno); // Sets fake versions of slow mo and slow pause. Use ts_set_speed for more options. -native ts_set_fakeslowmo(id,Float:time) -native ts_set_fakeslowpause(id,Float:time) +native ts_set_fakeslowmo(id,Float:time); +native ts_set_fakeslowpause(id,Float:time); /* Sets speed artificially. 1.0 is default, Go into fractions and decimals for slower * and put in higher numbers for higher speeds. Aura is how far things around you are effected * Time is the time until it wears off. 0.0 for speed will freeze people. Do not use negatives. */ -native ts_set_speed(id,Float:speed,Float:auradist,Float:time) +native ts_set_speed(id,Float:speed,Float:auradist,Float:time); /* Sets physics speed artificially. Things like sparks and sounds will be effected. * Any negative number will render all physics paused. */ -native ts_set_physics_speed(id,Float:speed) +native ts_set_physics_speed(id,Float:speed); // Returns 0 if no powerup is running. Returns the powerup type otherwise. -native ts_is_running_powerup(id) +native ts_is_running_powerup(id); // Highly experimental command which overrides powerup types. // Use if a powerup is already running, or if a powerup is not running. // Safe to use in powerup forward. -native ts_force_run_powerup(id,PWUP_TYPE) +native ts_force_run_powerup(id,PWUP_TYPE); diff --git a/plugins/include/vector.inc b/plugins/include/vector.inc index 2cbc9aa7..39ba89b8 100644 --- a/plugins/include/vector.inc +++ b/plugins/include/vector.inc @@ -41,19 +41,19 @@ native Float:vector_distance(const Float:vVector[3], const Float:vVector2[3]); */ stock IVecFVec(const IVec[3], Float:FVec[3]) { - FVec[0] = float(IVec[0]) - FVec[1] = float(IVec[1]) - FVec[2] = float(IVec[2]) + FVec[0] = float(IVec[0]); + FVec[1] = float(IVec[1]); + FVec[2] = float(IVec[2]); - return 1 + return 1; } /* Changes a float vec to an integer vec */ stock FVecIVec(const Float:FVec[3], IVec[3]) { - IVec[0] = floatround(FVec[0]) - IVec[1] = floatround(FVec[1]) - IVec[2] = floatround(FVec[2]) - - return 1 + IVec[0] = floatround(FVec[0]); + IVec[1] = floatround(FVec[1]); + IVec[2] = floatround(FVec[2]); + + return 1; }