AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   amx_uberslap (https://forums.alliedmods.net/showthread.php?t=19452)

[nFb]GraveKeeper 10-17-2005 02:43

amx_uberslap
 
1 Attachment(s)
Hi guys, it's been awhile posting here.

I just upgraded to AMX 1.60 on both a Windows and a Linux server. Everything is running great so far except for a few plugins that I really enjoy using. One of which is amx_uberslap.

The problem that I am having with this plugin is that it no longer plays the attached sound file that is associated with this plugin. No its not an issue with the sound file being in the wrong place on the server or the client's machine, I use this plugin on AMX 1.01 and it works perfectly but on 1.55 and 1.60 the plugin compiles fine and works however it just doesn't play the attached sound file.

Any help would be appreciate. I provided a 1.60 compiled version, sma, and the sound file.

Thank you for your help.

Code:
#include <amxmodx> #include <amxmisc> #include <fun> public admin_slap(id,level,cid){     if (!cmd_access(id,level,cid,2))     return PLUGIN_HANDLED     new name[32]     new arg[32]     read_argv(1,arg,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)     disarm_player(id,player)     set_task(0.1, "slap_player", 0, ids, 1, "a", 100)     set_task(11.5, "last_words", 0, ids, 1, "a", 0)     return PLUGIN_HANDLED } public disarm_player(id,victim){     new name[32], origin[3]     get_user_origin(victim,origin)     origin[2] -= 2000     set_user_origin(victim,origin)     new iweapons[32], wpname[32], inum     get_user_weapons(victim,iweapons,inum)     for(new a=0;a<inum;++a){         get_weaponname(iweapons[a],wpname,31)         engclient_cmd(victim,"drop",wpname)     }     engclient_cmd(victim,"weapon_knife")     origin[2] += 2005     set_user_origin(victim,origin)     get_user_name(victim,name,31)     return PLUGIN_CONTINUE } public last_words(ids[]) {     client_cmd(0,"spk misc/knockedout")     return PLUGIN_HANDLED } public slap_player(ids[]) {     new id = ids[0]     new power = 1,nopower= 0     if (get_user_health(id) > 1){         user_slap(id,power)     } else {         user_slap(id,nopower)     }     return PLUGIN_CONTINUE } public plugin_init(){     register_plugin("AMX Uber Slap","0.9.3","Skullz.NET")     register_concmd("amx_uberslap","admin_slap",ADMIN_SLAY,"<authid, nick or #userid>")     return PLUGIN_CONTINUE }

XxAvalanchexX 10-17-2005 16:49

Re: amx_uberslap
 
Quote:

Originally Posted by [nFb
GraveKeeper] I use this plugin on AMX 1.01 and it works perfectly but on 1.55 and 1.60 the plugin compiles fine and works however it just doesn't play the attached sound file.

Because 1.55/1.60 is the devil basically, it just made a lot of stuff stop working.

[nFb]GraveKeeper 10-17-2005 21:19

It appeares that this part of the plugin does not work with 1.60, any way to fix this?

Code:
public last_words(ids[]) {     client_cmd(0,"spk misc/knockedout")     return PLUGIN_HANDLED

Zenith77 10-17-2005 22:56

Code:
 public last_words(ids[]) {     client_cmd(0,"spk misc/knockedout")     return PLUGIN_HANDLED


0 = the server thats why its prob not playing


Code:
 public last_words(ids[]) {         for( new i =1; i<get_maxplayers(); i++) {                if( !is_user_connected(i) ) continue        client_cmd(i,"spk misc/knockedout")     }     return PLUGIN_HANDLED

Xanimos 10-17-2005 23:00

Quote:

Originally Posted by Zenith77
Code:
 public last_words(ids[]) {     client_cmd(0,"spk misc/knockedout")     return PLUGIN_HANDLED


0 = the server thats why its prob not playing


Code:
 public last_words(ids[]) {         for( new i =1; i<get_maxplayers(); i++) {                if( !is_user_connected(i) ) continue        client_cmd(i,"spk misc/knockedout")     }     return PLUGIN_HANDLED

Wrong. using client_cmd(0 , "da da da") will use the command on everyone.

[nFb]GraveKeeper 10-18-2005 23:15

Nope, that didn't fix it. Thanks for trying.


All times are GMT -4. The time now is 23:51.

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