Nick
05-12-2004, 01:09
I've been working on this plugin for a while and I compiled it with no errors on the compiler that came with amxx, but when I tryed the online compiler I got 3 errors,
#include <amxmodx>
#include <amxmisc>
public plugin_precache()
{
precache_sound("misc/tslap.wav")
}
public admin_tslap(id,level,cid) {
if (!cmd_access(id,level,cid,2))
return PLUGIN_HANDLED
new name[32], name2[32]
new arg[32]
get_user_name(id,name2,31)
new player = cmd_target(id,arg,5)
if (!player)
return PLUGIN_HANDLED
new ids[2]
ids[0] = player
get_user_name(player,name,32)
client_cmd(0,"spk misc/tslap")
set_hudmessage(225, 25, 25, -1.0, 0.32, 0, 2.0, 9.0, 0.8, 0.8, 2)
show_hudmessage(100,"%s Was Bitchslapped!!!")
return PLUGIN_HANDLED
}
public tslap(ids[]){
set_task(0.2, "slap_player", 0, ids, 1, "a", 5)
return PLUGIN_CONTINUE
}
public slap_player(ids[]) {
user_slap(ids[0],5) // Player is slapped with 5 Damage
return PLUGIN_CONTINUE
}
If anyone could help me out that would be great Thank You.
#include <amxmodx>
#include <amxmisc>
public plugin_precache()
{
precache_sound("misc/tslap.wav")
}
public admin_tslap(id,level,cid) {
if (!cmd_access(id,level,cid,2))
return PLUGIN_HANDLED
new name[32], name2[32]
new arg[32]
get_user_name(id,name2,31)
new player = cmd_target(id,arg,5)
if (!player)
return PLUGIN_HANDLED
new ids[2]
ids[0] = player
get_user_name(player,name,32)
client_cmd(0,"spk misc/tslap")
set_hudmessage(225, 25, 25, -1.0, 0.32, 0, 2.0, 9.0, 0.8, 0.8, 2)
show_hudmessage(100,"%s Was Bitchslapped!!!")
return PLUGIN_HANDLED
}
public tslap(ids[]){
set_task(0.2, "slap_player", 0, ids, 1, "a", 5)
return PLUGIN_CONTINUE
}
public slap_player(ids[]) {
user_slap(ids[0],5) // Player is slapped with 5 Damage
return PLUGIN_CONTINUE
}
If anyone could help me out that would be great Thank You.