Raised This Month: $ Target: $400
 0% 

Need help with my plugin


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
NiGHTFiRE
Senior Member
Join Date: Dec 2004
Location: Sweden
Old 02-18-2005 , 11:55   Need help with my plugin
Reply With Quote #1

I need help with my edited plugin. It's from amx_spank2 but i edited it. I need help bc it doesn't slap the person. Here is the source:
Code:
#include <amxmodx> #include <amxmisc> public admin_attitude(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) // Admin name     read_argv(1,arg,31) // Target player           new player = cmd_target(id,arg,5)     if (!player)        // Exception catch         return PLUGIN_HANDLED     new ids[2]     ids[0] = player     get_user_name(player,name,32)  // Extract name from player id     client_cmd(0,"spk misc/attitude") // Wav to all. For player only: client_cmd(ids[0], "spk misc/attitude.wav")                                                 client_print(0,print_chat, "%s Is getting slapped due to his high attitude by  %s",name,name2)     // Prints a message to all stating that a player is being slapped by the admin.     set_task(3.1, "attitude", 0, ids, 1, "a", 0)     // Delays slapping by 3.1 seconds to give the attitude.wav time to play         return PLUGIN_HANDLED } public spanking(ids[]){     client_cmd(ids[0],"say I will never be a bad boy again! I promise!") // Makes player say that he won't do it again     set_task(0.4, "slap_player", 0, ids, 1, "a", 100)    // Gives the player 100 spanks at 0.4 sec intervals     return PLUGIN_CONTINUE } public slap_player(ids[]) {     user_slap(ids[0],0)     // Slap player with 0 damage     return PLUGIN_CONTINUE } public plugin_precache()   {       precache_sound("misc/attitude.wav") // Forces client to download wav if not already present     return PLUGIN_CONTINUE } public plugin_init(){     register_plugin("amx_attitude","0.5","NiGHTFiRE")     register_concmd("amx_attitude","admin_attitude",ADMIN_SLAY,"<authid, nick or #userid>")     return PLUGIN_CONTINUE }
NiGHTFiRE is offline
Send a message via AIM to NiGHTFiRE Send a message via MSN to NiGHTFiRE
Votorx
Senior Member
Join Date: Jun 2004
Old 02-18-2005 , 12:17  
Reply With Quote #2

Code:
set_task(3.1, "attitude", 0, ids, 1, "a", 0)

eh, where's the function "attitude" anyways?
__________________
Currently Looking for a mod team.
Votorx is offline
Send a message via AIM to Votorx Send a message via MSN to Votorx Send a message via Yahoo to Votorx
Reply


Thread Tools
Display Modes

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 14:07.


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