Okay I edited some of my code and all and then when I compile I get an error (See Attachment)
Here is my plugin code so far.
Code:
/****************************************************************
* Smoke the Blunt *
* Version 0.0.2 - Date: 26th May 2004 *
* *
* By RPRaiden aka CopCartman <[email protected]> *
* Homepage - <a href="http://www.daspace.de" target="_blank" rel="nofollow noopener">http://www.daspace.de</a> *
* *
*****************************************************************
* *
* ADDITIONAL INFORMATION *
* *
*****************************************************************
* *
* This Plugin introduces a smoking affect to the *
* player who is under the affect of the command. *
* Admin can set Who to stone and for howlong. *
* This Plugin is designed for use with Inventory *
* plugin by Mr.Smith, Edited by Twillight Suzuka. *
* *
*****************************************************************
* *
* ORIGINAL BLUNT By ThorW with help from Duff & EJ *
* Adapted By RPRaiden with help from Twillight Suzuka *
* *
****************************************************************/
#include <amxmodx>
#include <amxmisc>
#include <fun>
new smoke
new usertime
public admin_blunt
(id,level,cid
){
if (!(get_user_flags(id
)&level
)){
console_print(id,
"[AMXX] You don't access to that command.")
return PLUGIN_HANDLED
}
new arg
[32]
read_argv(1,arg,
32)
read_argv(2,arg
[1],
32)
new player
= find_player("lb",arg
)
if (!player
) return PLUGIN_HANDLED
new name
[32], aname
[32]
get_user_name(player,name,
31)
get_user_name(id,aname,
31)
new aPlayer
[1]
aPlayer
[0]= player
has_blunt
(id,player
)
set_task(0.6,
"has_blunt",
0,aPlayer
[0],
2,
"a")
client_print(player,print_chat,
"* %s Has passed you a blunt, now you can relax",aname
)
return PLUGIN_HANDLED
}
public has_blunt
(id,player
) {
if(is_user_alive(player
)){
new vec
[3]
if(usertime
!=20){
usertime
+=1
}
get_user_origin(player,vec
)
new a1,b1
a1
= random_num(-30,
30)
b1
= random_num(-30,
30)
message_begin( MSG_BROADCAST,SVC_TEMPENTITY
)
write_byte( 5 )
write_coord(vec
[0]+a1
)
write_coord(vec
[1]+b1
)
write_coord(vec
[2]+30)
write_short( smoke
)
write_byte( 30 )
write_byte( 10 )
message_end()
if(usertime
=20){
set_task(0.6,
"blunt_smoked",
0,aPlayer
[0],
2,a
)
}else{
set_task(0.6,
"has_blunt",
0,aPlayer
[0],
2,a
)
}
}
public plugin_precache
(){
smoke
= precache_model("sprites/steam1.spr")
return PLUGIN_CONTINUE
}
public blunt_smoked
(id,player
) {
client_print(player,print_chat,
"* Man! Your Blunt has Burn Out! You need to get some more weed %s!,aPlayer)
return PLUGIN_CONTINUE
}
public plugin_init(){
register_plugin("Admin_Blunt2
","0.0.2
","RPRaiden
")
register_concmd("amx_blunt2
","admin_blunt
",ADMIN_LEVEL_A,"< nick >
")
return PLUGIN_CONTINUE
}