Raised This Month: $51 Target: $400
 12% 

API Scripting Help General Scripting Questions


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Depresie
Veteran Member
Join Date: Nov 2013
Old 10-11-2015 , 01:33   General Scripting Questions
Reply With Quote #1

In order to avoid useless threads, here you can ask various questions about scripting

Please do not post requests here, like how to fix this plugin or questions that require long detailed explanations, stick to simple questions

Last edited by Depresie; 10-11-2015 at 01:34.
Depresie is offline
zmd94
Veteran Member
Join Date: Nov 2013
Location: Malaysia (9w2zow).
Old 10-11-2015 , 03:10   Re: General Scripting Questions
Reply With Quote #2

In this a problem or statement?
zmd94 is offline
Depresie
Veteran Member
Join Date: Nov 2013
Old 10-11-2015 , 05:22   Re: General Scripting Questions
Reply With Quote #3

statement, in case players has some simple questions, for example what is the difference betwen variable and bool, what is the difference betwen registering variable in function and globaly etc...

it's better to have all these kind of question in just one thread, reasons:

1. Newbies can learn alot from a topic like this
2. We avoid useless threads

Last edited by Depresie; 10-11-2015 at 05:23.
Depresie is offline
zmd94
Veteran Member
Join Date: Nov 2013
Location: Malaysia (9w2zow).
Old 10-11-2015 , 05:37   Re: General Scripting Questions
Reply With Quote #4

Alright.
zmd94 is offline
Old 10-11-2015, 07:48
Chihuahuax
This message has been deleted by Chihuahuax.
Chihuahuax
Senior Member
Join Date: Oct 2014
Location: Malaysia
Old 10-11-2015 , 22:44   Re: General Scripting Questions
Reply With Quote #5

1)
Code:
public xxx
If (zp_get_user_zombie)
 return PLUGIN_HANDLED

 Bla bla bla
OR 2)
Code:
public xxx
If(!zp_get_user_zombie)
     Blablabla
Which one is better?
Chihuahuax is offline
Send a message via Skype™ to Chihuahuax
zmd94
Veteran Member
Join Date: Nov 2013
Location: Malaysia (9w2zow).
Old 10-11-2015 , 23:29   Re: General Scripting Questions
Reply With Quote #6

Both is alright.
zmd94 is offline
Chihuahuax
Senior Member
Join Date: Oct 2014
Location: Malaysia
Old 10-14-2015 , 08:34   Re: General Scripting Questions
Reply With Quote #7

PHP Code:
emit_sound(player,CHAN_ITEM,JETPACK_FLY,1.0,ATTN_NORM,1,PITCH_HIGH
How to change the time interval of emitting sound?
Currently the above code is called per second, can I change it so that it emits more frequently?

Last edited by Chihuahuax; 10-14-2015 at 08:52.
Chihuahuax is offline
Send a message via Skype™ to Chihuahuax
Depresie
Veteran Member
Join Date: Nov 2013
Old 10-15-2015 , 01:32   Re: General Scripting Questions
Reply With Quote #8

ahm, 1.0 is not the time, it's the volume...

the emit sound is called when the function is called
Depresie is offline
Chihuahuax
Senior Member
Join Date: Oct 2014
Location: Malaysia
Old 10-15-2015 , 03:50   Re: General Scripting Questions
Reply With Quote #9

Quote:
the emit sound is called when the function is called
thx i got it completely wrong

Last edited by Chihuahuax; 10-15-2015 at 03:53.
Chihuahuax is offline
Send a message via Skype™ to Chihuahuax
gfxchris
Member
Join Date: Feb 2016
Old 02-26-2016 , 09:41   Re: General Scripting Questions
Reply With Quote #10

for example zombie plague , there is an extra-item system
how can i add an simple print_chat to show to all players , including the buyer that he buyed smth? for ex
for all "player %s buyed armour*
for him "you've got 100 armour"
gfxchris 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 11:17.


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