AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   spawn beams (https://forums.alliedmods.net/showthread.php?t=116790)

One 01-26-2010 16:29

spawn beams
 
what i want to do ? = [Req] zbeamsprite maker


Quote:

i need a zbeamsprite spawner which makes 2 beamsprites.
with a menu or 2 commands.

for example :
player is on origin x1,y1,z1 and types amx_sprite1
and goes to origin x2,y2,z2 and types amx_sprite2

so between this points should the beamspeite be spawned with a task to show the beam for all users. + a config directory to save and load the origins on mapload :(
so i tried to write something like this. now i need a little help to get the 2. origins and spawn the sprites.

PHP Code:

register_clcmd("say 1","_makeZone")


public 
plugin_precache() 
{
    
sprite_zbeam precache_model("sprites/zbeam4.spr")
}
register_directory()
{
    
get_configsdir(g_ConfigsDir63)
    
format(g_CTZoneDir63"%s/CTzoneZ"g_ConfigsDir)
    
    if(!
dir_exists(g_CTZoneDir))
    {
        
log_amx("CT Zone directory does not exist")
        
g_DirExist false
    

    else 
    {
        
g_DirExist true
        
        
new curMap[32]
        
get_mapname(curMap31)
        
load_origins(curMap)
        
        
set_task(1.0"task_visuals"TASK_ID__"b")
    }
}
public 
open_CTZone(idlevelcid)
{
    if(!
cmd_access(idlevelcid1))
        return 
PLUGIN_HANDLED
    
    
if(!g_DirExist
        
console_print(id"CT Zone directory does not exist")
    else
        
display_CTZone(id)
    
    return 
PLUGIN_HANDLED
}
_makeZone(id)
{
    new 
iOrigin[3], CurMap[32]
    
get_user_origin(idiOrigin0)
    
get_mapname(CurMap31)

    
zoneID 0
    save_origin
(CurMapiOrigin)
    
load_origins(CurMap)
    
    if(
task_exists(TASK_ID))
        
remove_task(TASK_ID)


now i dk how to save the secund origins and after this write_coords :(


All times are GMT -4. The time now is 07:28.

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