Raised This Month: $ Target: $400
 0% 

Ok, Starting to learn how to script and Have a few questions


Post New Thread Closed Thread   
 
Thread Tools Display Modes
dekken
Veteran Member
Join Date: Jul 2007
Old 03-04-2008 , 09:32   Re: Ok, Starting to learn how to script and Have a few questions
#11

well i dont know
as long as it works good
iam fine with That..
Could you answer the Other questions?

Thanks.
__________________
Signature Goes Here
dekken is offline
[X]-RayCat
Senior Member
Join Date: Sep 2006
Old 03-04-2008 , 10:23   Re: Ok, Starting to learn how to script and Have a few questions
#12

Store them as global variables if you use them outside the client_kill, but if not store them inside that public.
[X]-RayCat is offline
dekken
Veteran Member
Join Date: Jul 2007
Old 03-04-2008 , 10:27   Re: Ok, Starting to learn how to script and Have a few questions
#13

well
i got that...
but could someone explain me how do i Send message to Admins only?
and How do i set Delay so Ppls wont spam with Those Kill messages?
Thanks.
__________________
Signature Goes Here
dekken is offline
>)SL(< | Wicked
Senior Member
Join Date: Jan 2008
Old 03-04-2008 , 11:57   Re: Ok, Starting to learn how to script and Have a few questions
#14

use set_task(<time in seconds>, "<name of the function your calling>")

make the client_print a seperate function and call set_task like so:
PHP Code:
public blah()
{
   
set_task(15.0"Chat_Print")    //this will wait for 15 seconds, THEN it will call the function Chat_Print()
}
 
public 
Chat_Print()
{
  
//do stuff....

if this is wrong, (i im pretty sure its right), sorry.

you will learn alot from here. I'm ALWAYS learning cool new stuff from this.
__________________
#Team !иکдиІтy
>)SL(< | Wicked is offline
dekken
Veteran Member
Join Date: Jul 2007
Old 03-04-2008 , 12:48   Re: Ok, Starting to learn how to script and Have a few questions
#15

Woah! Nice
Thank you very Much DDDDDDDDDD!!!!

Few more Questions for you all =\ :

I know how to make Say commands and make Them work and w/e
but how do you create a Say command that once It Activates, and second time Deactivates
#1 say /speed = ACTIVE
#2 say /speed = Normal Speed


2.
How do i make Ppls have sv_stepsize 999 When writing /stepsize
Or any other sv_thingy...

3.
Why when i set user speed, Changing a weapon will return back to old speed?
i dont exactly remember what i did but its something like:
cs_set_user_maxspeed(id, cs_get_user_maxspeed(id) + 600.0)


i got few more questions...but those first
Thanks
__________________
Signature Goes Here

Last edited by dekken; 03-04-2008 at 13:08.
dekken is offline
MattOG
Senior Member
Join Date: May 2005
Old 03-04-2008 , 13:20   Re: Ok, Starting to learn how to script and Have a few questions
#16

for the first one you could/would use a boolean.

As the function is called, check if it's on, if yes, turn it off, if no, turn it on....

second you would have to first have it change the server cvar, and then the client also (not sure if there is a client cvar for stepsize, guessing there is.

Third is possibly (don't quote me on this) due to cs changing your speed to match your gun (as you run slower with awp than with knife) can't really check as I'm at work, hence the reason for the quick reply... will fill in more when I get home if someone else hasn't already.
__________________

+Karma If I helped

Last edited by MattOG; 03-04-2008 at 13:23.
MattOG is offline
Styles
Veteran Member
Join Date: Jul 2004
Location: California
Old 03-04-2008 , 13:23   Re: Ok, Starting to learn how to script and Have a few questions
#17

Quote:
Originally Posted by [X]-RayCat View Post
Store them as global variables if you use them outside the client_kill, but if not store them inside that public.
There called localized variables. And they become more localized every time you inilize them. Hense. for(int i=0;i<32;i++) the variable i is now localized wthin that for statement so it can be used again.
Styles is offline
Send a message via AIM to Styles
dekken
Veteran Member
Join Date: Jul 2007
Old 03-04-2008 , 13:23   Re: Ok, Starting to learn how to script and Have a few questions
#18

Quote:
Originally Posted by MattOG View Post
for the first one you could/would use a boolean.

As the function is called, check if it's on, if yes, turn it off, if no, turn it on....

second you would have to first have it change the server cvar, and then the client also (not sure if there is a client cvar for stepsize, guessing there is.
Whaaaaaaaaaaaaaaaaat?
how do i do this?
Iam not that good at scripting..started only 2days ago.. >_<

Could you make an Example for each of those..
not Full code or w/e
just the way you do it
__________________
Signature Goes Here
dekken is offline
Styles
Veteran Member
Join Date: Jul 2004
Location: California
Old 03-04-2008 , 13:25   Re: Ok, Starting to learn how to script and Have a few questions
#19

Well I don't know what hes compairing it to but I belive he means something like

public functionoffun()
{
new bool:LikeTheVariable = true;
if(LikeTheVariable) // if its true
{
// Do What ever
}
else
{
// do if false.
}
}
Styles is offline
Send a message via AIM to Styles
MattOG
Senior Member
Join Date: May 2005
Old 03-04-2008 , 13:27   Re: Ok, Starting to learn how to script and Have a few questions
#20

yeah sorry... shouldn't do this quick reply thing.....
__________________

+Karma If I helped
MattOG is offline
Closed Thread



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 19:31.


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