Raised This Month: $ Target: $400
 0% 

2 questions %i and setting admin


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Author Message
kasu007
Junior Member
Join Date: Jan 2013
Old 01-16-2014 , 05:47   2 questions %i and setting admin
Reply With Quote #1

I tryed searching which is more useful or best to use %i OR %d for integer values
are there some privilegs using 1 to other.

And when Player already is admin.

lets say I want to remove admin, but not from the sql database and then
PHP Code:
server_cmd("amx_reloadadmins"); 
Just set temporarly no admin.

PHP Code:
#include <amxmodx>
#include <amxmisc>

public plugin_init() {
    
register_plugin("No Admin""v1""kasu");
    
register_clcmd("say /noadmin""noAdmin");
}

public 
noAdmin(id){
    
set_user_flags(idread_flags("z"));
    
client_print(idprint_chat"Should be no admin but your still... :S");

and 3rd
which is faster
setting using array as boolean or integer
PHP Code:
global_variable[512];

function 
bla(eventplayer, ....){
    
global_variable[event] = true;
    OR
    
global_variable[event] = 1;

which is faster / better way to use

and is there a way to set values "false" or / 0 in array without going through all array.
example
global_variable[16] = true;
global_variable[129] = true;
global_variable[3] = true;

is there a quick way like setting string array to 0
as global_variable[0] = 0;
but can you do the same for bool / int array

Last edited by kasu007; 01-16-2014 at 06:18. Reason: 3rd question
kasu007 is offline
 


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 10:06.


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