Raised This Month: $ Target: $400
 0% 

Menu Spectator ZP 5.0


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
MeliMeli
Senior Member
Join Date: Apr 2022
Location: Brazil
Old 05-03-2022 , 22:05   Menu Spectator ZP 5.0
Reply With Quote #1

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: ???
MeliMeli is offline
lexzor
Veteran Member
Join Date: Nov 2020
Old 05-04-2022 , 08:02   Re: Menu Spectator ZP 5.0
Reply With Quote #2

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!");
        }
    } 
lexzor is offline
MeliMeli
Senior Member
Join Date: Apr 2022
Location: Brazil
Old 05-04-2022 , 15:12   Re: Menu Spectator ZP 5.0
Reply With Quote #3

Error: Number of arguments does not match definition on line

---> user_silentkill(id, 0)
MeliMeli is offline
lexzor
Veteran Member
Join Date: Nov 2020
Old 05-04-2022 , 18:35   Re: Menu Spectator ZP 5.0
Reply With Quote #4

PHP Code:
user_silentkill(id1
lexzor is offline
MeliMeli
Senior Member
Join Date: Apr 2022
Location: Brazil
Old 05-04-2022 , 20:51   Re: Menu Spectator ZP 5.0
Reply With Quote #5

keeps giving errors
MeliMeli is offline
lexzor
Veteran Member
Join Date: Nov 2020
Old 05-05-2022 , 08:44   Re: Menu Spectator ZP 5.0
Reply With Quote #6

ok. i won t ask more

Last edited by lexzor; 05-05-2022 at 08:44.
lexzor is offline
MeliMeli
Senior Member
Join Date: Apr 2022
Location: Brazil
Old 05-05-2022 , 17:07   Re: Menu Spectator ZP 5.0
Reply With Quote #7

Ok
MeliMeli is offline
lexzor
Veteran Member
Join Date: Nov 2020
Old 05-05-2022 , 22:01   Re: Menu Spectator ZP 5.0
Reply With Quote #8

maybe post errors ? ))

Last edited by lexzor; 05-05-2022 at 22:02.
lexzor is offline
MeliMeli
Senior Member
Join Date: Apr 2022
Location: Brazil
Old 05-06-2022 , 16:25   Re: Menu Spectator ZP 5.0
Reply With Quote #9

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.
MeliMeli is offline
PrO_NiNjA_08
New Member
Join Date: May 2022
Location: Canada
Old 05-07-2022 , 03:13   Re: Menu Spectator ZP 5.0
Reply With Quote #10

Quote:
Originally Posted by MeliMeli View Post
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.
Send me your full code , will check it

Last edited by PrO_NiNjA_08; 05-07-2022 at 03:13.
PrO_NiNjA_08 is offline
Reply


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 21:18.


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