Raised This Month: $51 Target: $400
 12% 

AMXX Spawnangle Bug Fixer (jghg)


Post New Thread Reply   
 
Thread Tools Display Modes
Plugin Info:     Modification:   Counter-Strike        Category:   Server Management        Approver:   devicenull (200)
Little Chang
Junior Member
Join Date: May 2004
Location: Denmark
Old 07-17-2004 , 18:49   AMXX Spawnangle Bug Fixer (jghg)
Reply With Quote #1

Thanks to EKS for do the Port to AMXX

/*
AMXX Map Bug Fixer/Spawnangle Bug Fixer
=================
To set angles for a map just place the command(s) in amxmodx/configs/maps/mapname.cfg
like amxmodx/configs/maps/he_arena.cfg

The spawn points of the CT:s in the awp_map.bsp are rotated a little unfair, so you spawn facing the wall.
With this plugin and the Custom Map Configs plugin you can have problems like this permantently fixed on any map,
without having to change the mapfile itself.
Just add a short line (like "amx_spawnangle ct = 180") to the config file of the map you want to fix, and you're set.
You can also use the same command to turn the spawns in-game, should you ever need to. (ADMIN_CFG access required)

/jghg

USAGE
=====
amx_spawnangle <team (ct, t, or vip)> <mode (=, - or +)> <# of degrees>

Example uses:
amx_spawnangle t + 180 (this TURNS all terrorists spawns 180 degrees counter-clockwise if seen from above)
amx_spawnangle ct = 45 (this SETS all counter-terrorists spawns to exactly 45 degrees)
amx_spawnangle vip + 4 (you can TURN and SET vip's spawn too, if you want...)

Some suggested fixes for a few maps:
Face to Face

he_tennis.cfg: amx_spawnangle ct = 180
awp_map.cfg: amx_spawnangle ct = 180
3rooms.cfg: amx_spawnangle t = 180
aim_aztec.cfg: amx_spawnangle ct + 180
aim_firewall.cfg: amx_spawnangle t + 180
aim_glockrox.cfg: amx_spawnangle ct + 180
aim_headshot.cfg: amx_spawnangle t + 180
aim_paranoia.cfg: amx_spawnangle t + 180

VERSIONS
========
1.2, 040717 Ported to AMXX by EKS
name change from "AMX Map Bug Fixer" to "AMXX Spawnangle Bug Fixer"
Added extra check to entity "scan" to prevent it from going into a never ending loop
1.1, 031227 Removed use of isdigit function, which means this will probably work on older amx versions (?).
1.0, 031205 Complete change of everything. :-) We now rely on Custom Map Configs, and use amx_spawnangle to set the angles...
0.3, 031204 Removed to only use vexd and not xtrafun.
Fixed 3rooms.bsp
Changed plugin name because of more support for more maps...
0.2, ?????? Same problem with he_tennis, added support :-)
0.1, ?????? First version
*/

Have Fun - Little Chang
Attached Files
File Type: sma Get Plugin or Get Source (amxx_spawnangle_bug_fixer.sma - 3938 views - 5.2 KB)

Last edited by Little Chang; 01-23-2007 at 19:13.
Little Chang is offline
XxKpAznGuyxX
Senior Member
Join Date: Dec 2004
Location: EARTH!!
Old 07-16-2005 , 03:32  
Reply With Quote #2

Anyway to make the T spawn facing the walls? For right now I'm using your previous cvar for awp_map which makes thes CT's face towards the T's which just make its more chaos.. (Sorry I don't know my angles)
__________________
24/7 Chicago Terror-8.9.2.120:27015
XxKpAznGuyxX is offline
Send a message via AIM to XxKpAznGuyxX Send a message via MSN to XxKpAznGuyxX
Blitz
Senior Member
Join Date: Jul 2005
Location: Google
Old 07-16-2005 , 05:11  
Reply With Quote #3

Very interesting...
Nice plugin.
__________________
[img]http://img268.**************/img268/7071/blitz4ek.jpg[/img]

In the beginning, God created the search button.
Blitz is offline
Johnny got his gun
Veteran Member
Join Date: Jan 2004
Location: Tokyo
Old 07-16-2005 , 07:17  
Reply With Quote #4

Wow, long time no sea. I forgot about all plugins I made...

Anyway, you should probably edit the info because Custom Map Cfg plugins isn't used/needed.

To set angles for a map just place the command(s) in amxmodx/configs/maps/mapname.cfg
like amxmodx/configs/maps/he_arena.cfg


XxKpAznGuyxX: You can just try the cmd until it works. Try 0, 90, 180, 270. Maps are usually made in straight angles.
Johnny got his gun is offline
XxKpAznGuyxX
Senior Member
Join Date: Dec 2004
Location: EARTH!!
Old 07-16-2005 , 11:30  
Reply With Quote #5

It was amx_spawnangle t = 180 thanks

Edit - This Plugin rocks.. not that many ppl are now spawning.. instead of using spawn protection plugin this plugin is easier to use and better!

awp_map - spawn kill
fy_pool_day - nades spawn / spawn kill
fy_snow - nade spawn
cs_deagle5 - players can see there opponents respawn point
aim_map - spawn kill

I suggest you all should make all this map face towards the wall to prevent spawn killing..
__________________
24/7 Chicago Terror-8.9.2.120:27015
XxKpAznGuyxX is offline
Send a message via AIM to XxKpAznGuyxX Send a message via MSN to XxKpAznGuyxX
XxKpAznGuyxX
Senior Member
Join Date: Dec 2004
Location: EARTH!!
Old 07-19-2005 , 14:56  
Reply With Quote #6

L 07/19/2005 - 19:49:27: [AMXX] Native error in "entity_set_vector" on line 123 (file "amxx_spawnangle_bug_fixer.sma").
L 07/19/2005 - 19:49:27: [ENGINE] Invalid player 0 (not in-game)

this spam alot in my logs.. can anyone fix this?
__________________
24/7 Chicago Terror-8.9.2.120:27015
XxKpAznGuyxX is offline
Send a message via AIM to XxKpAznGuyxX Send a message via MSN to XxKpAznGuyxX
DahVid
Senior Member
Join Date: Jun 2005
Old 07-19-2005 , 15:05  
Reply With Quote #7

Quick guess.
Code:
new const PLUGINNAME[] = "AMXX Spawnangle Bug Fixer"  new const VERSION[] = "1.2"  new const AUTHOR[] = "jghg"  /*  Copyleft 2003  <a href="http://amxmod.net/forums/viewtopic.php?t=19198" target="_blank" rel="nofollow noopener">http://amxmod.net/forums/viewtopic.php?t=19198</a>  AMXX Map Bug Fixer/Spawnangle Bug Fixer =================  This plugin should be used in combination with JustinHoMi's Custom Map Configs. The spawn points of the CT:s in the awp_map.bsp are rotated a little unfair, so you spawn facing the wall.  With this plugin and the Custom Map Configs plugin you can have problems like this permantently fixed on any map, without having to change the mapfile itself.  Just add a short line (like "amx_spawnangle ct = 180") to the config file of the map you want to fix, and you're set.  You can also use the same command to turn the spawns in-game, should you ever need to. (ADMIN_CFG access required)  Requires Vexd utilities module.  /jghg  USAGE  =====  amx_spawnangle <team (ct, t, or vip)> <mode (=, - or +)> <# of degrees>  Example uses:     amx_spawnangle t + 180   (this TURNS all terrorists spawns 180 degrees counter-clockwise if seen from above)     amx_spawnangle ct = 45   (this SETS all counter-terrorists spawns to exactly 45 degrees)     amx_spawnangle vip + 4   (you can TURN and SET vip's spawn too, if you want...)  Some suggested fixes for a few maps:  he_tennis.bsp:   amx_spawnangle ct = 180  awp_map.bsp:   amx_spawnangle ct = 180  3rooms.bsp:      amx_spawnangle t = 180  VERSIONS  ========  1.2, 040717 Ported to AMXX by EKS             name change from "AMX Map Bug Fixer" to "AMXX Spawnangle Bug Fixer"             Added extra check to entity "scan" to prevent it from going into a never ending loop 1.1, 031227 Removed use of isdigit function, which means this will probably work on older amx versions (?).  1.0, 031205 Complete change of everything. :-) We now rely on Custom Map Configs, and use amx_spawnangle to set the angles...  0.3, 031204   Removed to only use vexd and not xtrafun.           Fixed 3rooms.bsp           Changed plugin name because of more support for more maps...  0.2, ??????   Same problem with he_tennis, added support :-)  0.1, ??????   First version  */  #include <amxmodx>  #include <amxmisc>  #include <engine>  public spawnangle_cmd(id, level, cid) {     if (!cmd_access(id,level,cid,4)) {        console_print(id, "Example use:  amx_spawnangle ct + 180  (adds 180 degrees to all CTs' spawnangles)")        return PLUGIN_HANDLED     }     if(is_user_connected(id)) {    // Get parameters     new arguments[100]     read_args(arguments, 99)     new team[4]     new mode[2]     new InternalDegrees[10]     if (parse(arguments, team, 3, mode, 1, InternalDegrees, 9) != 3) {        console_print(id, "[AMX] Error - couldn't read parse line!")        server_print("[AMX] Error - couldn't read parse line!")        return PLUGIN_HANDLED     }     // Check team     // info_vip_start = vip spawn     // info_player_start = ct spawn     // info_player_deathmatch = t spawn     new spawnentity[30]     if (equali(team, "ct"))        spawnentity = "info_player_start"     else if (equali(team, "t"))        spawnentity = "info_player_deathmatch"     else if (equali(team, "vip"))        spawnentity = "info_vip_start"     else {        console_print(id, "[AMX] Error - ^"%s^" is not a valid team (use ct, t, or vip)", team)        return PLUGIN_HANDLED     }           // Check mode     if (!equal(mode, "+") && !equal(mode, "-") && !equal(mode, "=")) {        console_print(id, "[AMX] Error - ^"%s^" is not a valid mode (use +, - or =)", mode)        return PLUGIN_HANDLED     }           // Check degrees     for (new i = 0;i < strlen(InternalDegrees);i++) {        //if (!isdigit(degrees[i])) {        if (InternalDegrees[i] < '0' || InternalDegrees[i] > '9') {           console_print(id, "[AMX] Error - ^"%s^" is not valid degrees (use only numbers)", InternalDegrees)           return PLUGIN_HANDLED        }     }           new Float:degreesvalue = floatstr(InternalDegrees)     // Do it... the rotation of spawns, that is :-)     new ent = 1, Float:angles[3], counter = 0     server_print("[AMX] Turning all %s spawn points...(Looking for ent of the %s class", team,spawnentity)     do {          ent = find_ent_by_class(ent, spawnentity)        if (ent != -1) {           entity_get_vector(ent,EV_VEC_angles,angles)                       if (equal(mode, "+"))              angles[1] += degreesvalue           else if (equal(mode, "-"))              angles[1] -= degreesvalue           else              angles[1] = degreesvalue           entity_set_vector(ent,EV_VEC_angles,angles)           counter++        }     }     while (ent != -1 && counter <= 1024)     if(counter == 1024)     server_print("The server Failed to find: %s",spawnentity)    console_print(id, "[AMX] Turned %d %s:s.", counter, spawnentity)     return PLUGIN_HANDLED  } } public plugin_init() {     register_plugin(PLUGINNAME, VERSION, AUTHOR)     register_concmd("amx_spawnangle", "spawnangle_cmd", ADMIN_CFG, "<team> <+/=> <degrees> (+ turn team's spawns degrees, = set team's spawns to degree direction)")  }
DahVid is offline
XxKpAznGuyxX
Senior Member
Join Date: Dec 2004
Location: EARTH!!
Old 07-19-2005 , 15:07  
Reply With Quote #8

I'm going to try it out right now
__________________
24/7 Chicago Terror-8.9.2.120:27015
XxKpAznGuyxX is offline
Send a message via AIM to XxKpAznGuyxX Send a message via MSN to XxKpAznGuyxX
XxKpAznGuyxX
Senior Member
Join Date: Dec 2004
Location: EARTH!!
Old 07-20-2005 , 22:50  
Reply With Quote #9

waring 209: function "spawnangle_cmd" should return a value

1 Warning.
Done.

Just wondering if I should still replace the previous file with the new compiled version.. I don't want to mess up my server
__________________
24/7 Chicago Terror-8.9.2.120:27015
XxKpAznGuyxX is offline
Send a message via AIM to XxKpAznGuyxX Send a message via MSN to XxKpAznGuyxX
n00bl0l
Junior Member
Join Date: Dec 2005
Old 12-20-2005 , 12:47   this plugins
Reply With Quote #10

//AMXXPC compile.exe
// by the AMX Mod X Dev Team


//// AMXX_Spawnangle_Bug_Fixer.sma
// C:\Documents and Settings\HP_Eier\Skrivebord\AMXX_Spawnangle_B ug_Fixer.sma(0)
: fatal error 101: cannot write to file: "C:\Documents and Settings\HP_Eier\Skr
ivebord\compiled\AMXX_Spawnangle_Bug_Fixer.am x"
//
// Compilation aborted.
// 1 Error.
// Could not locate output file C:\Documents and Settings\HP_Eier\Skrivebord\com
piled\AMXX_Spawnangle_Bug_Fixer.amx (compile failed).
//
// Compilation Time: 0,06 sec

Bug or something I had done wrong??? dunno please help me
__________________
Phu aka kim
n00bl0l is offline
Send a message via MSN to n00bl0l
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 18:53.


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