AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   [REQ] Fix set_task (https://forums.alliedmods.net/showthread.php?t=174798)

ShLuMieL 12-25-2011 13:58

[REQ] Fix set_task
 
Hey for all
i need someone fix me that's plugins
cuse set_task dont work i dont know why its like this.

PHP Code:

#include <amxmodx>
#include <cstrike>
#include <fun>
#define PLUGIN "Ammo"    
#define VERSION "1.0"    
#define AUTHOR "Asaf Mazon"  
public plugin_init()
{    
 
register_plugin(PLUGINVERSIONAUTHOR)    
 
 
register_clcmd("say /ammo""ammo"); 
}    
public 
ammo(id)
{
 new 
menu menu_create("Stealth""ammo3");
 
menu_additem(menu"\wStealth""1"0);
 
menu_setprop(menuMPROP_EXITMEXIT_ALL);
 
 
menu_display(idmenu0);
 return 
PLUGIN_HANDLED;
}
public 
ammo3(idmenuitem)
{
 if(
item == MENU_EXIT)
 {
  
menu_destroy(menu);
  return 
PLUGIN_HANDLED;
 }
 
 new 
data[6], szName[64];
 new 
accesscallback;
 
menu_item_getinfo(menuitemaccessdata,5szName,63callback);
 
 new 
key str_to_num(data);
 
 switch(
key)
 {
  case 
1:
  {
   
set_user_rendering(idkRenderFxNone000kRenderTransAlpha7)
   
set_task(15.0"REMOVE")
   
ColorChat(idNORMAL"%s You have bought^x04 Flashbang."TAG);
  }
 }
 
menu_destroy(menu);
 return 
PLUGIN_HANDLED;
}
public 
REMOVE(id)
{
 
set_user_rendering(idkRenderFxNone000kRenderTransAlpha250)


its dont do enything after 15 second's
the player stay with stealth.

hleV 12-25-2011 14:04

Re: [REQ] Fix set_task
 
Code:
set_task(15.0, "REMOVE")
->
Code:
set_task(15.0, "REMOVE", id)

ShLuMieL 12-25-2011 14:37

Re: [REQ] Fix set_task
 
Thank's


All times are GMT -4. The time now is 11:51.

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