Raised This Month: $ Target: $400
 0% 

[help]set_task


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Author Message
Lord94
Junior Member
Join Date: Aug 2018
Old 08-28-2019 , 15:15   [help]set_task
Reply With Quote #1

Trying to set_task to this funcion, but it executes to server :/
Code:
public sTask(id){         new szName[ 32 ];     read_argv( 1, szName, charsmax( szName ) );         new iPlayer = cmd_target( id, szName, CMDTARGET_ALLOW_SELF )         new victim[32];     get_user_name(iPlayer,victim,31)                 client_cmd(iPlayer, "+jump")     for( new i = 1; i <= g_iMaxPlayers ; i++ )     {         if( get_user_flags(i) & ADMIN_CHAT )         {             ColorChat(i, RED, "[REC] Player %s is now being checked",victim)                     }     }     return PLUGIN_HANDLED } public sRecord( id, iLevel, iCid ) {     if ( ! cmd_access( id, iLevel, iCid, 2 ) )         return PLUGIN_HANDLED         new szName[ 32 ];     read_argv( 1, szName, charsmax( szName ) );         new iPlayer = cmd_target( id, szName, CMDTARGET_ALLOW_SELF );         new victim[32];     get_user_name(iPlayer,victim,31)         if( ! is_user_connected( iPlayer ) )     {         client_print( id, print_console, "(!) Player could not found" );         return PLUGIN_HANDLED;     }     if (! is_user_alive( iPlayer ) ){         client_print( id, print_console, "(!) This action cannot be performed on a dead player" );         return PLUGIN_HANDLED;     }         client_cmd(id, "stop; record %s", victim)     set_task(2.0, "sTask")         for( new i = 1; i <= g_iMaxPlayers ; i++ )     {         if( get_user_flags(i) & ADMIN_CHAT )         {             ColorChat(i, RED, "[Check Up] ^1Recording to^3 %s.dem",victim)                     }     }     return PLUGIN_HANDLED }
Lord94 is offline
 


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 17:25.


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