Right now Im trying to learn how to add effects like lightning and such, I read about write_byte, but its out of my league

Im trying to make a bolt of lightning come down on top of a person every 10 seconds, Heres my code:
Code:
#include <amxmodx>
#include <amxmisc>
#include <fun>
public plugin_init()
{
register_plugin("God Like Player","0.1","Knekter")
register_clcmd("say /godme","god_me",ADMIN_KICK,": gives player godmode")
}
public plugin_precache()
{
light = precache_model("sprites/lgtning.spr")
return PLUGIN_CONTINUE
}
public god_me(id)
{
if(!(get_user_flags(id)&ADMIN_KICK))
{
client_print(id,print_chat,"[AMXX] HAHAHA nice try!")
return PLUGIN_HANDLED
}
set_user_godmode(id,1)
new Origin[33][3]
get_user_origin(id,Origin[id])
message_begin(MSG_BROADCAST,SVC_TEMPENTITY,Origin[id],id)
write_byte(0)
write_coord(Origin[0])
write_coord(Origin[1])
write_coord(Origin[2])
write_short(light)
write_byte(1) // frame start
write_byte(5) // framerate
write_byte(2) // life
write_byte(20) // width
write_byte(30) // noise
write_byte(200) // r, g, b
write_byte(200) // r, g, b
write_byte(200) // r, g, b
write_byte(200) // brightness
write_byte(200) // speed
message_end()
set_task(10.0,"god_me",0,id,1)
return PLUGIN_CONTINUE
}
I got some errors, but Its not even right. Heres the errors though:
Code:
Small compiler 2.1.0 Copyright (c) 1997-2002, ITB CompuPhase
godme.sma(12) : error 017: undefined symbol "light"
godme.sma(27) : error 035: argument type mismatch (argument 1)
godme.sma(28) : error 035: argument type mismatch (argument 1)
godme.sma(29) : error 035: argument type mismatch (argument 1)
godme.sma(30) : error 017: undefined symbol "light"
godme.sma(42) : error 035: argument type mismatch (argument 4)
6 Errors.
__________________