AlliedModders

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

Kero_1116 04-24-2005 19:05

coding help
 
1 Attachment(s)
in unlimited_nade.sma, i can't amx_nade myself because it says i have immunity, anyone able to help me fix it up a bit?

thanks

XxAvalanchexX 04-24-2005 19:57

Change the two
Code:
cmd_target(id, arg, 5)
to
Code:
cmd_target(id, arg, 4)

Kero_1116 04-25-2005 17:57

that did not work

v3x 04-25-2005 18:16

Code:
cmd_target(id, arg, 3)

Kero_1116 04-25-2005 18:29

sorry, but that code doesn't work, but i tried 2 and now it works, thanks

Kero_1116 04-28-2005 09:25

i just realized it doesn't work anymore, anyone know a fix?

Zor 04-28-2005 13:32

I think this is what you are looking for.

Code:

public givenade(id, level, cid)
{
    // The last number in the cmd_access should be the number or
    // arguments that this function received
    // Ex: the arguments for your plugin should be 2
    // Check to see if name/@TEAM/*(all) is in the read_argv(1, arg, 31)
    // 0 = cmd eg: amx_nade
    // 1 = id of caller
    // 2 = name | @TEAM | *
    if(!cmd_access(id, level, cid, 2))
          return PLUGIN_HANDLE

    new arg[32]
    read_argv(1, arg, 31)
}

Cheers!

Kero_1116 04-28-2005 23:18

Quote:

Originally Posted by Zor
I think this is what you are looking for.

Code:

public givenade(id, level, cid)
{
    // The last number in the cmd_access should be the number or
    // arguments that this function received
    // Ex: the arguments for your plugin should be 2
    // Check to see if name/@TEAM/*(all) is in the read_argv(1, arg, 31)
    // 0 = cmd eg: amx_nade
    // 1 = id of caller
    // 2 = name | @TEAM | *
    if(!cmd_access(id, level, cid, 2))
          return PLUGIN_HANDLE

    new arg[32]
    read_argv(1, arg, 31)
}

Cheers!

now, what should id o with this code?


All times are GMT -4. The time now is 16:37.

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