Raised This Month: $ Target: $400
 0% 

Using write byte and such


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Author Message
knekter
Senior Member
Join Date: Mar 2004
Location: PA
Old 03-28-2004 , 21:07   Using write byte and such
Reply With Quote #1

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.
__________________
More updates for Matrix Mod!
knekter is offline
Send a message via AIM to knekter Send a message via MSN to knekter
 



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:32.


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