AlliedModders

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

bonafide 10-23-2006 23:40

Totally Lost.....
 
First ever plugin i am trying to make about giveing kills and i didnt see it as a plugin and wanted to make one.
Lost on this part of code:
Code:
public plugin_init() {"amx-addkill""1.0","bonafide")     register_srvcmd("amx_addkill","add_kill",admin_addkill,<authid, nick, @team or #userid><kills>")     register_clcmd("amx_addkill","add_kill",admin_addkill,user give kill to specific user")     register_concmd("amx_addkill","add_kill",ADMIN_LEVEL_A,user add kill to specific user)     } public do_addkill(id) {     if (!(get_user_flags(id)&ADMIN_immunity)) {         console_print(id,"[AMXX] No access")         return PLUGIN_HANDLED
I have no idea really, i wanted to make sure this is correct.
It is probly completely wrong

SweatyBanana 10-24-2006 00:15

Re: Totally Lost.....
 
Oh god I just wanted to get it to compile.

Code:

#include <amxmodx>
#include <amxmisc>
#include <cstrike>


public plugin_init()
{
    register_plugin("amx-addkill","1.0","bonafide")
    register_clcmd("amx_addkill","do_addkill",ADMIN_LEVEL_A,"user add kill to specific user")
}

public do_addkill(id)
{
    if (!(get_user_flags(id)&ADMIN_IMMUNITY))
    {
        console_print(id,"[AMXX] No access")
        return PLUGIN_HANDLED;
    }
    return PLUGIN_HANDLED;
}


bonafide 10-24-2006 00:18

Re: Totally Lost.....
 
Damn i was way off :(
Thanks i would give karma but i gave you some already and cant give any to you :(

Rolnaaba 10-24-2006 10:19

Re: Totally Lost.....
 
this will add one kill to whoever you type in console
correct use of comand:
Code:

amx_addkill <target>
Code:
#include <amxmodx> #include <amxmisc> #include <fun> public plugin_init() {     register_plugin("amx-addkill","1.0","bonafide")     register_clcmd("amx_addkill","do_addkill",ADMIN_IMMUNITY,"Adds 1 kill to specific user") } public do_addkill(id, level, cid) {     if(!cmd_access(id, level, cid, 2)) {         console_print(id,"[AddKill] You Do not have access")         return PLUGIN_HANDLED     }     else {         new Arg1[24]         read_argv(1, Arg1, 23)         new target = cmd_target(id, Arg1, 1)                 if(!target) {             console_print(id, "[AddKill]Could not target %s, was not found!", Arg1)         }         else {             set_user_frags(target, get_user_frags(target)+1)         }     }     return PLUGIN_HANDLED }


All times are GMT -4. The time now is 04:49.

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