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_ConfigsDir, 63)
format(g_CTZoneDir, 63, "%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(curMap, 31)
load_origins(curMap)
set_task(1.0, "task_visuals", TASK_ID, _, _, "b")
}
}
public open_CTZone(id, level, cid)
{
if(!cmd_access(id, level, cid, 1))
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(id, iOrigin, 0)
get_mapname(CurMap, 31)
zoneID = 0
save_origin(CurMap, iOrigin)
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
__________________