Raised This Month: $ Target: $400
 0% 

problem with use button once plugin


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
akcaliberg
Senior Member
Join Date: Nov 2011
Location: Istanbul
Old 08-13-2013 , 12:42   Re: problem with use button once plugin
Reply With Quote #4

PHP Code:
public show_menu_(tid){ 
    new 
id=tid-TASK_SHOWMENU;
    if(!
is_user_connected(id)) return
    new 
iTeam=get_user_team(id); 
    new 
menu_idkeys
    new 
menuUp player_menu_infoidmenu_idkeys ); 
    
// Only display menu if another isn't shown 
    
if ( iTeam && (menuUp <= || menu_id 0) ){ 
        new 
iTime=get_pcvar_num(gcvarFRVoteTime); 
        new 
iOffset=get_systime()-giVoteStart
        
iTime-=iOffset
        new 
szMenu[128]; 
        
formatex(szMenu127"\yDa li zelite FreeRun?^n^n\w1. Da^n2. Ne"); 
        
show_menu(idKeysFFVoteszMenuiTime"FRVote"); 
    }else 
        
show_menu_(tid// you don't have to set task for that

or

PHP Code:
public client_disconnect(id) {
    if(
task_exists(id+TASK_SHOWMENU)) remove_task(id+TASK_SHOWMENU)

when someone disconnects, you must remove the tasks that related to the player. Otherwise task will continue and engine cant find the player.

Last edited by akcaliberg; 08-13-2013 at 12:45.
akcaliberg is offline
 



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:00.


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