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

set task [id] parameter


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
JocAnis
Veteran Member
Join Date: Jun 2010
Old 11-13-2018 , 07:17   set task [id] parameter
Reply With Quote #1

hi guys..i know set task parameters-topics have been made hundred times, but or im stupid or idk i couldnt implement these solutions in my case, what is the thing:

PHP Code:
ent_changeid )
{
    new 
p_ent g_entcurrent_playerid ] ]
    if( 
pressedid ][ g_button_id ] )
    {
        
set_pevp_entpev_groupinfopevp_entpev_groupinfo ) | id );
        
set_task4.0"change_press"id )
    }
}
public 
change_pressid )
{
    
set_pevg_entcurrent_playerid  ]] , pev_groupinfopevg_entcurrent_playerid ]], pev_groupinfo ) & ~id )

so i wanna send in set_task this: p_ent, so change_press will cache and use that..any help is welcomed, also if this matters: new g_ent[ 500 ]
__________________
KZ Public Autocup - PrimeKZ

My blog: http://primekz.xyz (in progress...) - not active (dec 2022)

Last edited by JocAnis; 11-13-2018 at 07:19.
JocAnis is offline
klippy
AlliedModders Donor
Join Date: May 2013
Location: Serbia
Old 11-13-2018 , 08:21   Re: set task [id] parameter
Reply With Quote #2

Use the 4th and 5th parameters of set_task to pass data. Read the doc.
__________________
klippy is offline
JocAnis
Veteran Member
Join Date: Jun 2010
Old 11-13-2018 , 10:56   Re: set task [id] parameter
Reply With Quote #3

ok read it again and tryed min 5 combinations..mostly error were Index out of bounds or Invalid entity
PHP Code:
new p_ent]
p_ent] = current_playerid 
if( 
pressedid ][ g_button_id ] )
{
    
set_pevg_entp_ent] ], pev_groupinfopevg_entp_ent[0] ], pev_groupinfo ) | id //this is working ok
    
set_task4.0"change_press"idp_entsizeofp_ent ) )
}
//and then
public change_pressidp_ent[] )
{
    
set_pevg_entp_ent] ] , pev_groupinfopevg_entp_ent[0] ], pev_groupinfo ) & ~id )

any explanation why it doesnt work is welcomed..
__________________
KZ Public Autocup - PrimeKZ

My blog: http://primekz.xyz (in progress...) - not active (dec 2022)
JocAnis is offline
klippy
AlliedModders Donor
Join Date: May 2013
Location: Serbia
Old 11-13-2018 , 11:23   Re: set task [id] parameter
Reply With Quote #4

I think you switched around the parameters in change_press. Data is first, then task id.
__________________
klippy is offline
JocAnis
Veteran Member
Join Date: Jun 2010
Old 11-13-2018 , 11:30   Re: set task [id] parameter
Reply With Quote #5

hvala, to je to izgleda

thank you sir!
__________________
KZ Public Autocup - PrimeKZ

My blog: http://primekz.xyz (in progress...) - not active (dec 2022)
JocAnis 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 01:39.


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