AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   Menu Spectator ZP 5.0 (https://forums.alliedmods.net/showthread.php?t=337625)

MeliMeli 05-03-2022 22:05

Menu Spectator ZP 5.0
 
Hi, good morning/afternoon/evening. I currently use ZP 5.0 and would like to know how to add the "Spectator" menu to the main menu of ZP 5.0 and how can I set a flag for it. I don't know the code for this, if anyone can help me...

// 8. Spectator
if(!(get_user_flags(id) & ADMIN_LEVEL_B))
len += formatex(menu[len], charsmax(menu) - len, "\r8. \wJoin Spectator^n")
else
len += formatex(menu[len], charsmax(menu) - len, "\d8. Join Spectator^n")

case 7: ???

lexzor 05-04-2022 08:02

Re: Menu Spectator ZP 5.0
 
PHP Code:

len += formatex(menu[len], charsmax(menu) - len"\r8.%s Join Spectator^n"is_user_admin(id) == "\w" "\d");

    case 
7:
    {
        if(
is_user_admin(id))
        {
            if(
is_user_alive(id))
                
user_silentkill(id0)
            
            if(
CsTeams:cs_get_user_team(id) != CS_TEAM_SPECTATOR)
            {
                
cs_set_user_team(idCS_TEAM_SPECTATOR);
                
client_print_color(idprint_team_default,"^4[ZP]^1 You have been moved to^3 spectator^1!");
            }
            else 
client_print_color(idprint_team_default,"^4[ZP]^1 You already are a^3 spectator^1!");
        }
    } 


MeliMeli 05-04-2022 15:12

Re: Menu Spectator ZP 5.0
 
Error: Number of arguments does not match definition on line

---> user_silentkill(id, 0)

lexzor 05-04-2022 18:35

Re: Menu Spectator ZP 5.0
 
PHP Code:

user_silentkill(id1


MeliMeli 05-04-2022 20:51

Re: Menu Spectator ZP 5.0
 
keeps giving errors

lexzor 05-05-2022 08:44

Re: Menu Spectator ZP 5.0
 
ok. i won t ask more

MeliMeli 05-05-2022 17:07

Re: Menu Spectator ZP 5.0
 
Ok

lexzor 05-05-2022 22:01

Re: Menu Spectator ZP 5.0
 
maybe post errors ? :)))

MeliMeli 05-06-2022 16:25

Re: Menu Spectator ZP 5.0
 
PHP Code:

 case 7:
    {
        if(
is_user_admin(id))
        {
            if(
is_user_alive(id))
                
user_silentkill(id0)
            
            if(
CsTeams:cs_get_user_team(id) != CS_TEAM_SPECTATOR)
            {
                
cs_set_user_team(idCS_TEAM_SPECTATOR);
            }
            
        }
    } 


Error:

Error: Number of arguments does not match definition on line 284
Line 284 is user_silentkill(id, 0)

(id, 1) not work.

lexzor 05-06-2022 16:26

Re: Menu Spectator ZP 5.0
 
then try user_silentkill(id)


All times are GMT -4. The time now is 21:18.

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