Raised This Month: $51 Target: $400
 12% 

JailBreak


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Z1PAS
Junior Member
Join Date: Aug 2018
Location: Lithuania
Old 02-05-2019 , 03:52   JailBreak
Reply With Quote #1

im have problem i want only ct can use days meniu how to fix?

PHP Code:
Show_jailbreakmenu(id)
{
    new 
sBuf[64], paccess;
    
    
formatex(sBuf63"\r[-\yPrisonBreak.lt\r-] \yPagrindinis meniu^n")
    new 
iMenu menu_create(sBuf"jailbreakmenu_handle")
    
    if(
fm_get_user_team(id) == TEAM_PRISONERS)

    
paccess Check_lr_available(idfalse) ? 0:(1<<26);
    
formatex(sBufcharsmax(sBuf), "%sPaskutinis prasymas", !paccess "\y":"\d")
    
menu_additem(iMenusBuf"LREQUEST"paccess)
    
    
paccess Check_shop_available(idfalse) ? 0:(1<<26);
    
formatex(sBufcharsmax(sBuf), "%sParduotuve",  !paccess "\y":"\d")
    
menu_additem(iMenusBuf"SHOP"paccess)
    
    
paccess Check_day_available(idfalse) ? 0:(1<<26);
    
formatex(sBufcharsmax(sBuf), "%sDienos meniu", !paccess "\y":"\d"
    
menu_additem(iMenusBuf"DAYS"paccess)
    
    new 
sItemname[32], sItemdata[2], iItemaccessiItemteam
    
    
for(new 0g_jbmm_itemsi++)
    {
        
iItemteam ArrayGetCell(g_jbmm_itemteami)
        
        if((
iItemteam != fm_get_user_team(id)) &&  iItemteam != TEAM_PRISONERS)
        {
            continue
        }
        
        
ArrayGetString(g_jbmm_itemnameisItemnamecharsmax(sItemname))
        
iItemaccess ArrayGetCell(g_jbmm_itemaccessi)
        
        
ExecuteForward(fw_jbmm_itemaddedg_fw_returnidi)
        
        switch( 
g_fw_return )
        {
            case 
JB_MENU_ITEM_DONT_SHOW: continue;
            case 
JB_MENU_ITEM_UNAVAILABLE:
            {
                
iItemaccess = (1<<26);
                
formatex(sBufcharsmax(sBuf), "\d%s"sItemname)
            }
            default: 
formatex(sBufcharsmax(sBuf), "\y%s"sItemname)
        }
        
        
num_to_str(isItemdatacharsmax(sItemdata))
        
menu_additem(iMenusBufsItemdataiItemaccess)
    }
    
    
menu_addtext(iMenu"^n\yCia galite keisti komanda!"0)
    
menu_additem(iMenu"\yKeisti \rkomanda!""JOIN")
    
    
menu_setprop(iMenuMPROP_NUMBER_COLOR"\w")
    
menu_display(idiMenu)
}

public 
jailbreakmenu_handle(idmenuitem)
{
    if(
item == MENU_EXIT)
    {
        
menu_destroy(menu)
        return
    }
    
    new 
sData[10], sName[64], iCallbackiAccess
    menu_item_getinfo
(menuitemiAccesssDatacharsmax(sData), sNamecharsmax(sName), iCallback)
    new 
itemid str_to_num(sData)
    
    
// destroyin the menu..
    
menu_destroy(menu)
    
    if(
contain(sName"\d") != -1)
    {
        
Show_jailbreakmenu(id)
        return
    }
    if(
equal(sData"SHOP"))
    {
        
shop_menu(id)
        return;
    }
    if(
equal(sData"DAYS"))
    {
        
days_menu(id)
        return;
    }
    if(
equal(sData"JOIN"))
    {
        
join_menu(id);
        return;
    }
    if(
equal(sData"LREQUEST"))
    {
        
Show_lastrequestmenu(id)
        return;
    }
    
    
ExecuteForward(fw_jbmm_item_selectedg_fw_returniditemid)

Z1PAS is offline
DjSoftero
Veteran Member
Join Date: Nov 2014
Location: Lithuania
Old 02-05-2019 , 04:56   Re: JailBreak
Reply With Quote #2

PHP Code:
native CsTeams:cs_get_user_team(index, &any:model CS_DONTCHANGE);
enum CsTeams
{
    
CS_TEAM_UNASSIGNED 0,
    
CS_TEAM_T          1,
    
CS_TEAM_CT         2,
    
CS_TEAM_SPECTATOR  3,
};


if(
cs_get_user_team(id) != TEAM_YOU_NEED)//if the team of the player who calls the function is not the team you need, then end the function there
    
return PLUGIN_HANDLED
not sure whether you should use PLUGIN_CONTINUE, or PLUGIN_HANDLED, but both should work
DjSoftero is offline
Z1PAS
Junior Member
Join Date: Aug 2018
Location: Lithuania
Old 02-05-2019 , 05:38   Re: JailBreak
Reply With Quote #3

it blocks all commands from Terrorists
Z1PAS is offline
DjSoftero
Veteran Member
Join Date: Nov 2014
Location: Lithuania
Old 02-05-2019 , 05:39   Re: JailBreak
Reply With Quote #4

show the code
DjSoftero is offline
Z1PAS
Junior Member
Join Date: Aug 2018
Location: Lithuania
Old 02-05-2019 , 05:44   Re: JailBreak
Reply With Quote #5

PHP Code:
Show_jailbreakmenu(id)
{
    new 
sBuf[64], paccess;
    
    
formatex(sBuf63"\r[-\yPrisonBreak.lt\r-] \yPagrindinis meniu^n")
    new 
iMenu menu_create(sBuf"jailbreakmenu_handle")
    
    if(
fm_get_user_team(id) == TEAM_PRISONERS)

    
paccess Check_lr_available(idfalse) ? 0:(1<<26);
    
formatex(sBufcharsmax(sBuf), "%sPaskutinis prasymas", !paccess "\y":"\d")
    
menu_additem(iMenusBuf"LREQUEST"paccess)
    
    
paccess Check_shop_available(idfalse) ? 0:(1<<26);
    
formatex(sBufcharsmax(sBuf), "%sParduotuve",  !paccess "\y":"\d")
    
menu_additem(iMenusBuf"SHOP"paccess)
    
    
paccess Check_day_available(idfalse) ? 0:(1<<26);
    
formatex(sBufcharsmax(sBuf), "%sDienos meniu", !paccess "\y":"\d")
    
menu_additem(iMenusBuf"DAYS"paccess)
    

         if(
cs_get_user_team(id) != TEAM_GUARDS)//if the team of the player who calls the function is not the team you need, then end the function there 
         
return PLUGIN_CONTINUE;  
     
    
    new 
sItemname[32], sItemdata[2], iItemaccessiItemteam
    
    
for(new 0g_jbmm_itemsi++)
    {
        
iItemteam ArrayGetCell(g_jbmm_itemteami)
        
        if((
iItemteam != fm_get_user_team(id)) &&  iItemteam != TEAM_ANY)
        {
            continue
        }
        
        
ArrayGetString(g_jbmm_itemnameisItemnamecharsmax(sItemname))
        
iItemaccess ArrayGetCell(g_jbmm_itemaccessi)
        
        
ExecuteForward(fw_jbmm_itemaddedg_fw_returnidi)
        
        switch( 
g_fw_return )
        {
            case 
JB_MENU_ITEM_DONT_SHOW: continue;
            case 
JB_MENU_ITEM_UNAVAILABLE:
            {
                
iItemaccess = (1<<26);
                
formatex(sBufcharsmax(sBuf), "\d%s"sItemname)
            }
            default: 
formatex(sBufcharsmax(sBuf), "\y%s"sItemname)
        }
        
        
num_to_str(isItemdatacharsmax(sItemdata))
        
menu_additem(iMenusBufsItemdataiItemaccess)
    }
    
    
menu_addtext(iMenu"^n\yCia galite keisti komanda!"0)
    
menu_additem(iMenu"\yKeisti \rkomanda!""JOIN")
    
    
menu_setprop(iMenuMPROP_NUMBER_COLOR"\w")
    
menu_display(idiMenu)
}

public 
jailbreakmenu_handle(idmenuitem)
{
    if(
item == MENU_EXIT)
    {
        
menu_destroy(menu)
        return
    }
    
    new 
sData[10], sName[64], iCallbackiAccess
    menu_item_getinfo
(menuitemiAccesssDatacharsmax(sData), sNamecharsmax(sName), iCallback)
    new 
itemid str_to_num(sData)
    
    
// destroyin the menu..
    
menu_destroy(menu)
    
    if(
contain(sName"\d") != -1)
    {
        
Show_jailbreakmenu(id)
        return
    }
    if(
equal(sData"SHOP"))
    {
        
shop_menu(id)
        return;
    }
    if(
equal(sData"DAYS"))
    {
        
days_menu(id)
        return;
    }
    if(
equal(sData"JOIN"))
    {
        
join_menu(id);
        return;
    }
    if(
equal(sData"LREQUEST"))
    {
        
Show_lastrequestmenu(id)
        return;
    }
    
    
ExecuteForward(fw_jbmm_item_selectedg_fw_returniditemid)

Z1PAS is offline
Reply



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 16:35.


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