how do i set_task() and transfer three parameters with it?
hi, i have a " public function(client, level, cid) "
and i want to set_task to execute function in 0.1 sec once and give it three paramaters |
Re: how do i set_task() and transfer three parameters with it?
Quote:
PHP Code:
|
Re: how do i set_task() and transfer three parameters with it?
Just don't run the task if the player has not the acces level could be better...
|
Re: how do i set_task() and transfer three parameters with it?
i must be doing something wrong, why does it says unknown command and returns usage 1st time i use function via console cmd and it works fine 2nd time i use it
Code:
register_concmd("amx_cmdone", "cmdone", ADMIN_BAN, "<nick, #userid, authid> <param1> <param2>"); |
Re: how do i set_task() and transfer three parameters with it?
#include <amxmisc>
|
Re: how do i set_task() and transfer three parameters with it?
i have it included, my code isnt the full plugin code, just a part i have problems with (set task)
#include <amxmodx> #include <amxmisc> #include <fakemeta> #include <regex> |
Re: how do i set_task() and transfer three parameters with it?
Not sure if I'm understanding correctly but if you are trying to not pass cmdtwo to players without access, just do.
PHP Code:
|
Re: how do i set_task() and transfer three parameters with it?
it just returns it's usage when i type "amx_cmdone player 1 2" but when i do it 2nd time it works fine =\ and if i do it once then reconnect then do it again once it works too =\ but not if i connect and do it once from beginning.
and if i do set_task ( 0.1 , "cmdtwo" , _ , param, 3, "a",2); it will return its usage twice and won't do anything (first time) =\ |
Re: how do i set_task() and transfer three parameters with it?
Oops, if you are using my code above and passing 3 arguments, change the cmd_access to accept 4 params instead of 1. You had it correctly but I didn't know the commands usage.
|
Re: how do i set_task() and transfer three parameters with it?
no, actually i'm useing my code i posted above (it must work =\ )
may my problem be becouse of read_argv() in cmdtwo? if i remove access level check from cmdtwo instead of usage return it will say client with that name or userid not found (first time) i think problem is in read_argv(), i still don't understand how it works second time, cuz i have in cmdtwo() these: read_argv(1, arg, sizeof(arg) - 1); read_argv(2, arg, sizeof(arg) - 1); read_argv(3, arg, sizeof(arg) - 1); |
| All times are GMT -4. The time now is 08:49. |
Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.