Raised This Month: $ Target: $400
 0% 

Grenade spawn.


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
ScrappeR
Senior Member
Join Date: Dec 2010
Old 07-14-2013 , 18:53   Grenade spawn.
Reply With Quote #1

How to make every 10 seconds have grenade..?

PHP Code:
#include <amxmodx>
#include <hamsandwich>
#include <fun>


public plugin_init()
    
RegisterHam(Ham_Spawn"player""FwdPlayerSpawnPost"1);


public 
FwdPlayerSpawnPost(id)
{
    if(
is_user_alive(id))
        
give_item(id"weapon_smokegrenade");

__________________
ScrappeR is offline
akcaliberg
Senior Member
Join Date: Nov 2011
Location: Istanbul
Old 07-14-2013 , 19:06   Re: Grenade spawn.
Reply With Quote #2

PHP Code:
public plugin_init() {
    
register_plugin(PLUGINVERSIONAUTHOR)
    
    
RegisterHam(Ham_Spawn,"player","HamPlayerSpawnPost",1)    
}
public 
HamPlayerSpawnPost(id) {
    
give_item(id,"weapon_smokegrenade")
    
set_task(10.0,"GiveBomb",id,_,_,"b")
}
public 
GiveBomb(id) {
    if(!
is_user_connected(id) || !is_user_alive(id)) remove_task(id)
    else 
give_item(id,"weapon_smokegrenade")

akcaliberg is offline
ScrappeR
Senior Member
Join Date: Dec 2010
Old 07-14-2013 , 19:20   Re: Grenade spawn.
Reply With Quote #3

Quote:
Originally Posted by akcaliberg View Post
PHP Code:
public plugin_init() {
    
register_plugin(PLUGINVERSIONAUTHOR)
    
    
RegisterHam(Ham_Spawn,"player","HamPlayerSpawnPost",1)    
}
public 
HamPlayerSpawnPost(id) {
    
give_item(id,"weapon_smokegrenade")
    
set_task(10.0,"GiveBomb",id,_,_,"b")
}
public 
GiveBomb(id) {
    if(!
is_user_connected(id) || !is_user_alive(id)) remove_task(id)
    else 
give_item(id,"weapon_smokegrenade")

have same erros pls full script//
__________________
ScrappeR is offline
YamiKaitou
Has a lovely bunch of coconuts
Join Date: Apr 2006
Location: Texas
Old 07-14-2013 , 19:22   Re: Grenade spawn.
Reply With Quote #4

Quote:
Originally Posted by ScrappeR View Post
have same erros pls full script//
What errors? You never said you had errors before so how could you be having the same errors? To answer your original question, use a task
__________________
ProjectYami Laboratories

I do not browse the forums regularly anymore. If you need me for anything (asking questions or anything else), then PM me (be descriptive in your PM, message containing only a link to a thread will be ignored).
YamiKaitou is offline
ScrappeR
Senior Member
Join Date: Dec 2010
Old 07-14-2013 , 19:28   Re: Grenade spawn.
Reply With Quote #5

Quote:
Originally Posted by YamiKaitou View Post
What errors? You never said you had errors before so how could you be having the same errors? To answer your original question, use a task
I need to mod the respawn?
When HEgrenade shoot after 10 seconds again to have HE?
__________________
ScrappeR is offline
ConnorMcLeod
Veteran Member
Join Date: Jul 2006
Location: France (95)
Old 07-14-2013 , 19:39   Re: Grenade spawn.
Reply With Quote #6

Lol, if you want HE grenade, why do you give SMOKE grenades ?

Also, you want 1 HE every 10 seconds, or 1 HE 10 seconds after player have thrown his last one ?
__________________
- tired and retired -

- my plugins -
ConnorMcLeod is offline
ScrappeR
Senior Member
Join Date: Dec 2010
Old 07-14-2013 , 19:48   Re: Grenade spawn.
Reply With Quote #7

wtf?

Bro every 10 seconds and hudmessage
example, 10, 9, 8.... 1
You have HeGrenade!
Understand now?
__________________
ScrappeR is offline
mottzi
Veteran Member
Join Date: May 2010
Location: Switzerland
Old 07-14-2013 , 21:00   Re: Grenade spawn.
Reply With Quote #8

yes, and this is no place to get free codes. Ask exact questions of scripting mechanics. Dont ask for c&p-ready code...
mottzi is offline
Send a message via MSN to mottzi
akcaliberg
Senior Member
Join Date: Nov 2011
Location: Istanbul
Old 07-14-2013 , 21:19   Re: Grenade spawn.
Reply With Quote #9

Are you requesting a plugin or want to learn how to do it ?
akcaliberg is offline
TheDS1337
Veteran Member
Join Date: Jun 2012
Old 07-15-2013 , 06:12   Re: Grenade spawn.
Reply With Quote #10

Tested and working:
Code:
#include <amxmodx> #include <fun> #include <hamsandwich> public plugin_init()     RegisterHam(Ham_Spawn, "player", "forward_SpawnPost", 1); public forward_SpawnPost(id) {     if (!is_user_alive(id))         return;             set_task(10.0, "task_GiveGrenade", id, _, _, "b"); } public task_GiveGrenade(id) {     if (user_has_weapon(id, CSW_HEGRENADE))         return;             give_item(id, "weapon_hegrenade"); }
TheDS1337 is offline
Reply


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 06:22.


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