![]() |
Some gs2 help...
Ok, I am making a simple level ban system.
Now, I can add the string to the clientr.levelbans, but how do I remove a certain var from it? So, when a staff says /ban oo_jazz_oo event_something.nw then that is added to clientr.levelbans. When a staff says /unban oo_jazz_oo event_something.nw, how do I get that var from the clientr.levelbans and delete it? |
PHP Code:
|
Wont that remove the first var in the list of clientr.levelbans?
What if event_something.nw is the 4th in line? Or 20th? I need the script to find that var in the line of vars and delete it... |
Quote:
No it doesnt remove the first "var" in the array. It removes whatever you tell it to in the params (I.E remove(paramshere) ). |
remove() ... takes the index, doesn't it? Do something like this ...
PHP Code:
|
I still don't know what you guys don't understand about what I said x-x
remove works just fine for this |
Where "tokens[1]" is, is where your parameter will go, if you tokenize the player chat before having to remove the player.
I.E. PHP Code:
|
PHP Code:
|
Quote:
In which case, what I posted should work for the most part. |
Oh, now that changes things up. Why is he using a clientr prefix o_o
|
Quote:
|
Quote:
You wrote the same thing I did -_- |
Directly from the wiki for you doubters.
PHP Code:
|
Ah, delete then.
|
Simply done:
PHP Code:
|
| All times are GMT +2. The time now is 07:20 AM. |
Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2025, vBulletin Solutions Inc.
Copyright (C) 1998-2019 Toonslab All Rights Reserved.