Raised This Month: $32 Target: $400
 8% 

Bug Report Help


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Ehabz
Junior Member
Join Date: Jun 2017
Old 07-16-2017 , 21:46   Help
Reply With Quote #1

Hello Guys.

So I Started ZP Server And it seems working fine but there is Problem That When Sniper Mode start and u still didnt choose weapon from the Weapon Menu and u are sniper then u choose a weapon Suddenly Sniper has ak47 or M4a1 and Deagle I want to disable that Any help?
Ehabz is offline
georgik57
Veteran Member
Join Date: Oct 2008
Location: 🎧Music World
Old 07-17-2017 , 13:25   Re: Help
Reply With Quote #2

Use a better ZP. Sounds like it's done by an amateur.
__________________
georgik57 is offline
Send a message via MSN to georgik57 Send a message via Yahoo to georgik57 Send a message via Skype™ to georgik57
!Morte
Veteran Member
Join Date: May 2010
Old 07-17-2017 , 14:46   Re: Help
Reply With Quote #3

Just

PHP Code:
    if (g_sniper[id])
        return; 
on

PHP Code:
public show_menu_buy1(taskid
__________________
First Zombie Class
[ZP] Zombie Class: Houndeye Zombie
Quote:
Originally Posted by lucas_7_94 View Post
tenes que saber pawn antes de intentar hacer algo digno.
!Morte is offline
Send a message via MSN to !Morte Send a message via Skype™ to !Morte
Ehabz
Junior Member
Join Date: Jun 2017
Old 07-17-2017 , 16:45   Re: Help
Reply With Quote #4

Quote:
Originally Posted by !Morte View Post
Just

PHP Code:
    if (g_sniper[id])
        return; 
on

PHP Code:
public show_menu_buy1(taskid



Can u be more specific since im newbie @!Morte

Last edited by Ehabz; 07-17-2017 at 16:46.
Ehabz is offline
!Morte
Veteran Member
Join Date: May 2010
Old 07-17-2017 , 17:58   Re: Help
Reply With Quote #5

Quote:
Originally Posted by Ehabz View Post
Can u be more specific since im newbie @!Morte
First, go to this function:

PHP Code:
// Buy Menu 1
public show_menu_buy1(taskid)
{
    
// Get player's id
    
static id
    
(taskid g_maxplayers) ? (id ID_SPAWN) : (id taskid);
    
    
// Player dead?
    
if (!g_isalive[id])
        return;
    
    
// Zombies or survivors get no guns
    
if (g_zombie[id] || g_survivor[id])
        return;
    
    
// Bots pick their weapons randomly / Random weapons setting enabled
    
if (get_pcvar_num(cvar_randweapons) || g_isbot[id])
    {
        
buy_primary_weapon(idrandom_num(0ArraySize(g_primary_items) - 1))
        
menu_buy2(idrandom_num(0ArraySize(g_secondary_items) - 1))
        return;
    }
    
    
// Automatic selection enabled for player and menu called on spawn event
    
if (WPN_AUTO_ON && taskid g_maxplayers)
    {
        
buy_primary_weapon(idWPN_AUTO_PRI)
        
menu_buy2(idWPN_AUTO_SEC)
        return;
    }
    
    static 
menu[300], lenweapmaxloops
    len 
0
    maxloops 
min(WPN_STARTID+7WPN_MAXIDS)
    
    
// Title
    
len += formatex(menu[len], charsmax(menu) - len"\y%L \r[%d-%d]^n^n"id"MENU_BUY1_TITLE"WPN_STARTID+1min(WPN_STARTID+7WPN_MAXIDS))
    
    
// 1-7. Weapon List
    
for (weap WPN_STARTIDweap maxloopsweap++)
        
len += formatex(menu[len], charsmax(menu) - len"\r%d.\w %s^n"weap-WPN_STARTID+1WEAPONNAMES[ArrayGetCell(g_primary_weaponidsweap)])
    
    
// 8. Auto Select
    
len += formatex(menu[len], charsmax(menu) - len"^n\r8.\w %L \y[%L]"id"MENU_AUTOSELECT"id, (WPN_AUTO_ON) ? "MOTD_ENABLED" "MOTD_DISABLED")
    
    
// 9. Next/Back - 0. Exit
    
len += formatex(menu[len], charsmax(menu) - len"^n^n\r9.\w %L/%L^n^n\r0.\w %L"id"MENU_NEXT"id"MENU_BACK"id"MENU_EXIT")
    
    
// Fix for AMXX custom menus
    
if (pev_valid(id) == PDATA_SAFE)
        
set_pdata_int(idOFFSET_CSMENUCODE0OFFSET_LINUX)
    
    
show_menu(idKEYSMENUmenu, -1"Buy Menu 1")

Then, in this line

PHP Code:
    // Zombies or survivors get no guns
    
if (g_zombie[id] || g_survivor[id])
        return; 
Add this:

PHP Code:
    // Zombiesm survivors and snipers get no guns
    
if (g_zombie[id] || g_survivor[id] || g_sniper[id])
        return; 
And thats it. I recommend you to go to the Code Snippets/Tutorials section to understand the basic things of programming.
__________________
First Zombie Class
[ZP] Zombie Class: Houndeye Zombie
Quote:
Originally Posted by lucas_7_94 View Post
tenes que saber pawn antes de intentar hacer algo digno.

Last edited by !Morte; 07-17-2017 at 17:58.
!Morte is offline
Send a message via MSN to !Morte Send a message via Skype™ to !Morte
Ehabz
Junior Member
Join Date: Jun 2017
Old 07-20-2017 , 08:23   Re: Help
Reply With Quote #6

I can find any of this in buy_menus.sma file im talking about zp5.0.8
Ehabz is offline
XINLEI
me too
Join Date: Jun 2011
Location: Colombian Coffee storage
Old 07-20-2017 , 22:57   Re: Help
Reply With Quote #7

Quote:
Originally Posted by Ehabz View Post
I can find any of this in buy_menus.sma file im talking about zp5.0.8
Original ZP 5.08 doesn't have sniper/assasin mode. there's a good package in these forums ready to go. Just search.
XINLEI 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 12:42.


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