help a newb what is #define and #include
#1

#include <streamer>
#include <YSF>
#include <zcmd>
#pragma dynamic
#define blabla
#define dynamicobject
stuff like that
idk any things like this tell me what thay are and how thay work and how i use these 2 start a simple script
Reply
#2

I like your enthusiasm and innovation to learn the basics! With this I must congratulate you sir.

The #include is normally included at the top/beginning of this script. An include can contain functions which can used in the process of scripting. When starting a new script, the 'a_samp' include is already included, as this contains some very useful functions such as 'SendClientMessage' etc... The ZCMD include contains it's native functions which help process the following code and parameters of a command. Example:

pawn Код:
CMD:hello(playerid, params[])
{
   SendClientMessage(playerid, COLOR, "Hello!")
}
The ZCMD include and the a_samp contains all the necessary functions for the command to process and function correctly. Without the include, you will receive errors as the compiler can simply not recognize 'what is being stated/used'.

So to simplify, includes are necessary when scripting. They contain the 'information' in which the compiler can recognize to process what you have coded.

Hope that helps.
Reply
#3

thank you so much i have now got a idea what iam dealing with this is very helpful
Reply
#4

https://sampwiki.blast.hk/wiki/Category:Tutorials is your best resource
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)