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

Model Spawner (Updated)


Post New Thread Reply   
 
Thread Tools Display Modes
Plugin Info:     Modification:   ALL        Category:   Fun Stuff       
mysticssjgoku4
Veteran Member
Join Date: Jan 2005
Location: Chicago Heights, IL
Old 06-10-2006 , 13:27   Model Spawner (Updated)
Reply With Quote #1

NPC Spawner virtually allows you to spawn solid, perfect models standing at any point, in any map, very, very, very, VERY, easily.

Code:
/*  _______ ______ _______     ______                                      (_______|_____ (_______)   / _____)                                     _     _ _____) )         ( (____  ____  _____ _ _ _ ____  _____  ____ | |   | |  ____/ |         \____ \|  _ \(____ | | | |  _ \| ___ |/ ___) | |   | | |    | |_____    _____) ) |_| / ___ | | | | | | | ____| |    |_|   |_|_|     \______)  (______/|  __/\_____|\___/|_| |_|_____)_|                                      |_|                      - Remo Williams                                |------------------------------------------------------------------------------>.. |--------------------->..Change Log..<----------------------------------------->.. |->..June 10, 2006..<---------------------------------------------------------->.. |------>..Released 1.0..<------------------------------------------------------>.. |------>..Released 1.1..<------------------------------------------------------>.. |------------------------------------------------------------------------------>..                    */

Requirements:
Code:
- Notepad
- Thinking
- Ages 16+
Configuration Files: (npcs_spawnable.ini automatically generated)
Code:
//[NPC Spawner] Format:
//
//[MapName]
//[NPC] X Y Z ANGLE "MODEL"
//[/MapName]
Example file for iburgcity_b3v4:
Code:
[iburgcity_b3v4]

//Bank
[NPC] -49 884 -107 -90 "models/player/gordon/gordon.mdl"

//Gunshop
[NPC] 192 -621 -339 180 "models/player/agent/agent.mdl"

//Carshop
[NPC] 239 -748 -139 0 "models/player/agent/agent.mdl"

//Edeka
[NPC] 1308 952 -11 -90 "models/player/agent/agent.mdl"
[NPC] 1164 1120 -11 180 "models/player/agent/agent.mdl"

//Storage
[NPC] -156 1370 92 0 "models/player/agent/agent.mdl"

//XXX-Bar
[NPC] 224 2726 -131 180 "models/player/agent/agent.mdl"

//Bar
[NPC] -2573 -747 -203 -135 "models/player/agent/agent.mdl"

//Diner
[NPC] -768 -1052 -211 90 "models/player/agent/agent.mdl"

[/iburgcity_b3v4]
Commands: (Privs: OriginInfo=ADMIN_LEVEL_A)
Code:
- amx_origininfo <0-overview/1-save to file> " - Throws current coordinates + angle into an exported file in the logs dir."
So basically,
to add a NPC for mecklenburg_b5 @ point X: 550 Y: 660 Z: 770 Angle: 90 with the player model "agent".

Do this:
Code:
[mecklenburg_b5]
[NPC] 550 660 770 90 "models/player/agent/agent.mdl"
[/mecklenburg_b5]
Simple enough, eh?
Have fun!
Attached Files
File Type: sma Get Plugin or Get Source (remo_npc_spawner.sma - 1448 views - 7.6 KB)
__________________


Last edited by mysticssjgoku4; 06-25-2006 at 10:18.
mysticssjgoku4 is offline
Send a message via AIM to mysticssjgoku4 Send a message via MSN to mysticssjgoku4
VEN
Veteran Member
Join Date: Jan 2005
Old 06-10-2006 , 14:15  
Reply With Quote #2

Code:
entity_set_int(npc,EV_INT_solid, 2)
Do not harcode constants:
Code:
entity_set_int(npc,EV_INT_solid, SOLID_BBOX)

Code:
if(equali(arg2,""))
There are a better way:
Code:
if (!arg2[0])
VEN is offline
keVn
Member
Join Date: Jun 2006
Old 06-10-2006 , 20:00  
Reply With Quote #3

Umm.. how do you check the coordinates? Lol.
keVn is offline
mysticssjgoku4
Veteran Member
Join Date: Jan 2005
Location: Chicago Heights, IL
Old 06-10-2006 , 20:49  
Reply With Quote #4

amx_origininfo
__________________

mysticssjgoku4 is offline
Send a message via AIM to mysticssjgoku4 Send a message via MSN to mysticssjgoku4
syke
Junior Member
Join Date: Jul 2005
Old 06-10-2006 , 21:02  
Reply With Quote #5

wait.. so this adds them permanatly or just for round or till map change?
__________________
If you think v3x is a PIMP, paste this into your sig!
syke is offline
Send a message via AIM to syke Send a message via MSN to syke
mysticssjgoku4
Veteran Member
Join Date: Jan 2005
Location: Chicago Heights, IL
Old 06-10-2006 , 21:55  
Reply With Quote #6

They stay spawned until you remove them from the file and restart the server/map.
__________________

mysticssjgoku4 is offline
Send a message via AIM to mysticssjgoku4 Send a message via MSN to mysticssjgoku4
keVn
Member
Join Date: Jun 2006
Old 06-10-2006 , 22:18  
Reply With Quote #7

Aww if only you could make it stay forever.
keVn is offline
diamond-optic
Veteran Member
Join Date: May 2005
Old 06-10-2006 , 22:22  
Reply With Quote #8

Quote:
Originally Posted by keVn
Aww if only you could make it stay forever.
umm didnt you read what he said?

if you want it to stay 'forever' then dont ever delete it from the config...
__________________
diamond-optic is offline
keVn
Member
Join Date: Jun 2006
Old 06-10-2006 , 22:25  
Reply With Quote #9

"and restart server/map"

That means if your server crashes or you restart the map, it disappears.
keVn is offline
LittleDude
Member
Join Date: Dec 2004
Location: Selah, WA
Old 06-10-2006 , 22:33  
Reply With Quote #10

I think he means remove it from the file then restart the server/map and then they will be gone
__________________
It is stupid to be stupid, and stupid to not be stupid
LittleDude is offline
Send a message via AIM to LittleDude
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 06:25.


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