Raised This Month: $ Target: $400
 0% 

Add entity in map


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Author Message
Phant
Veteran Member
Join Date: Sep 2009
Location: New Jersey
Old 09-29-2009 , 03:47   Add entity in map
Reply With Quote #1

Hello, i newbie in AMXX scripting, and i want to create plugin for add entity in special map.

Simple plan:
If current map = "de_dust2"
If Create Entity "cycler_sprite"
Add classname?
Add "origin" (coordinates)
Add "model" (sprites/*.spr)
Add "angles"
EndIf
EndIf

I try:
Code:
/* Script generated by Pawn Studio */

#include <amxmodx>
#include <fakemeta>

#define PLUGIN    "Add entity in map"
#define AUTHOR    "Phant"
#define VERSION    "1.0"

public plugin_init()
{
    register_plugin(PLUGIN, VERSION, AUTHOR)
    
    new s_Map[32];
    get_mapname(s_Map, charsmax(s_Map));
    if (equal(s_Map, "de_dust2"))
    {
        new entity = engfunc(EngFunc_CreateNamedEntity, engfunc(EngFunc_AllocString, "info_target"))
            set_pev(entity, pev_classname, "cycler_sprite")
            set_pev(entity, pev_model, "sprites/3dmflaora.spr")
            set_pev(entity, pev_angles, "0, 90, 0")
            set_pev(entity, pev_origin, "197.0, 2190.0, -31")
    }

}
Don't work , can you show an example?
Thanks & sorry!

And question: where to get a compiler? I use this: http://www.amxmodx.org/webcompiler.cgi.

Last edited by Phant; 09-29-2009 at 03:49.
Phant is offline
Send a message via ICQ to Phant
 



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 22:41.


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