Raised This Month: $ Target: $400
 0% 

[REQ] Command from console every 5 mins


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
misak1717
Junior Member
Join Date: May 2013
Old 02-15-2014 , 05:59   [REQ] Command from console every 5 mins
Reply With Quote #1

hello,
Does anyone know how to make plugin that will:
- Send a command every 5-10 minutes
- command from console - sm_setspell [Random number from 0 to 13] [Random number from 1 to 5] @!me

I was trying to remake this one https://forums.alliedmods.net/showthread.php?t=233413
But Im just beginner and im clueless atm
Thanks for advice.
misak1717 is offline
wyd3x
Senior Member
Join Date: Sep 2012
Old 02-16-2014 , 04:30   Re: [REQ] Command from console every 5 mins
Reply With Quote #2

I don`t understand what do you mean.
every 5 min`s, console do "sm_setspell [Random number from 0 to 13] [Random number from 1 to 5] @!me"
that command players need to do or that console command...?
__________________
my plugins:
deleter v2.1 || [Store] Chat Color (1.2) - csgo || [Store] Award winner team
need a private plugin?
contact with me: PM, EMAIL: [email protected], discord: wyd3x #2096
private plugins: Hunger Games, [Store] Lottery, [Store] Gamble, VIP
wyd3x is offline
misak1717
Junior Member
Join Date: May 2013
Old 02-16-2014 , 07:29   Re: [REQ] Command from console every 5 mins
Reply With Quote #3

console command, thats why @!me
misak1717 is offline
misak1717
Junior Member
Join Date: May 2013
Old 02-18-2014 , 08:22   Re: [REQ] Command from console every 5 mins
Reply With Quote #4

bump
misak1717 is offline
Mitchell
~lick~
Join Date: Mar 2010
Old 02-18-2014 , 09:45   Re: [REQ] Command from console every 5 mins
Reply With Quote #5

ripped this out of sm_setspell. probably be better than to make a player issue a command
Code:
SetSpell(client, spell, uses)
{
	new ent = GetSpellBook(client);
	if(!IsValidEntity(ent)) return;
	SetEntProp(ent, Prop_Send, "m_iSelectedSpellIndex", spell);
	SetEntProp(ent, Prop_Send, "m_iSpellCharges", uses);
}



SetSpellUses(client, uses)
{
	new ent = GetSpellBook(client);
	if(!IsValidEntity(ent)) return;
	SetEntProp(ent, Prop_Send, "m_iSpellCharges", uses);
}

GetSpell(client)
{
	new ent = GetSpellBook(client);
	if(!IsValidEntity(ent)) return -1;
	return GetEntProp(ent, Prop_Send, "m_iSelectedSpellIndex");
}

GetSpellUses(client)
{
	new ent = GetSpellBook(client);
	if(!IsValidEntity(ent)) return 0;
	return GetEntProp(ent, Prop_Send, "m_iSpellCharges");
}

GetSpellBook(client)
{
	new entity = -1;
	while((entity = FindEntityByClassname(entity, "tf_weapon_spellbook")) != INVALID_ENT_REFERENCE)
	{
		if(GetEntPropEnt(entity, Prop_Send, "m_hOwnerEntity") == client) return entity;
	}
	return -1;
}
Mitchell is offline
misak1717
Junior Member
Join Date: May 2013
Old 02-18-2014 , 12:50   Re: [REQ] Command from console every 5 mins
Reply With Quote #6

Thanks, youre awesome Mitchell!
What does it do? Going to try it out.
misak1717 is offline
Mitchell
~lick~
Join Date: Mar 2010
Old 02-19-2014 , 10:00   Re: [REQ] Command from console every 5 mins
Reply With Quote #7

Porbably wont do much since it's just a snippet of code..
Mitchell is offline
misak1717
Junior Member
Join Date: May 2013
Old 02-20-2014 , 13:46   Re: [REQ] Command from console every 5 mins
Reply With Quote #8

nah
misak1717 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 21:28.


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