AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   Reserved Championship slots (https://forums.alliedmods.net/showthread.php?t=222969)

VisioNN 08-08-2013 13:15

Reserved Championship slots
 
i had this error
"error 006: must be assigned to an array"
know anyone how to fix it?

PHP Code:

#include <amxmodx>
#include <amxmisc>
#include <engine>

#define ACCESS ADMIN_SLAY


new steam[40];

public 
plugin_init() 
{
    
register_plugin("reserved,"1.0","VisioN")
    register_logevent("
roundstart", 2, "1=Round_Start")
    steam[1]="
STEAM_0:0:658786799";
    steam[2]="
STEAM_0:0:543534534";


}

public roundstart(id)
{
   set_task(0.7, "
client_connect", id)
}

public client_connect(id)
{
    new k=0, authid[32], i, userid2;
    userid2 = get_user_userid(id)
    get_user_authid(id, authid, 31)
    
    
    for(i=0;i<=40;i++)
    {    
        if(steam = authid)
        {
            k=1;
        }
    }
    if(k=0)
    {
    server_cmd("
kick #%d", userid2)

    
}




wickedd 08-08-2013 14:59

Re: Reserved Championship slots
 
What are you trying to do?

VisioNN 08-08-2013 16:10

Re: Reserved Championship slots
 
a plugin who kick's from server clients who haven't a specific steamid

eq.
if a player enter on server and he doesn't have one of these steamid will get kick from server
PHP Code:

    steam[1]="STEAM_0:0:658786799";
    
steam[2]="STEAM_0:0:543534534"


YamiKaitou 08-08-2013 16:17

Re: Reserved Championship slots
 
Neither of those SteamID's are valid

Black Rose 08-08-2013 16:38

Re: Reserved Championship slots
 
Code:
#include <amxmodx> new steam[][] = {     "STEAM_0:0:658786799",     "STEAM_0:0:543534534" }; public plugin_init() {     register_plugin("reserved","1.0","VisioN");     } public client_authorized(id) {     new authid[32];     get_user_authid(id, authid, 31)         for ( new i = 0 ; i <= sizeof steam ; i++ ) {         if ( equali(steam[i], authid) ) {             return;         }     }         server_cmd("kick #%d", get_user_userid(id)) }

VisioNN 08-08-2013 16:41

Re: Reserved Championship slots
 
PHP Code:

if ( equali(steam[i], authid) ) {
            return;
        } 

that dont work....

mottzi 08-08-2013 18:44

Re: Reserved Championship slots
 
Whynot?

YamiKaitou 08-08-2013 18:49

Re: Reserved Championship slots
 
Have you tried valid SteamIDs?

VisioNN 08-08-2013 19:02

Re: Reserved Championship slots
 
yes i put my steamid and i invite 4 friends who haven't steamid in plugin and server don't kick them...

YamiKaitou 08-08-2013 19:08

Re: Reserved Championship slots
 
The reason why I asked is because the 2 SteamID's you provided are not valid. To make sure, you are using a 100% Steam Only server?


All times are GMT -4. The time now is 15:53.

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