Problem or not -
StR_MaRy - 24.06.2017
Hey guys if i would create a rob system and i will put it as a include in pawno/includes then i will add it to my gamemode #include <name of the include> it will be a problem ? or it will be like in gamemode , i will have lag/crash ?
Re: Problem or not -
JasonRiggs - 24.06.2017
I believe you can't put commands in the include, If you want to make it as an include you may just make the functions, but the cmds should be made in game, And put it in the buttom of your includes.
Re: Problem or not -
StR_MaRy - 24.06.2017
Quote:
Originally Posted by JasonRiggs
I believe you can't put commands in the include, If you want to make it as an include you may just make the functions, but the cmds should be made in game, And put it in the buttom of your includes.
|
how ? "but the cmds should be made in game" how can i put them in gamemode and in the same time at the bottom of my include?
P.S: i already put my system in include and it worked fine i wanted to know if i will have problems with the system commands will stop etc...
Re: Problem or not -
JasonRiggs - 24.06.2017
If you meant to make it like include <%s.pwn> then it will work perfectly, I thought that you were speaking about a .inc file, I don't know if it is possible to add commands in a .inc file, But i guess no..
Re: Problem or not -
StR_MaRy - 24.06.2017
Quote:
Originally Posted by JasonRiggs
If you meant to make it like include <%s.pwn> then it will work perfectly, I thought that you were speaking about a .inc file, I don't know if it is possible to add commands in a .inc file, But i guess no..
|
i really mean .inc file

and it worked i tested do a simple command and compile your gamemode with it and test it

it 100% work
P.S: and yes it is possible JunkBuster if you remember the anti-hack had commands in it
Re: Problem or not -
Vince - 24.06.2017
The include directive just copies everything from the source file into the target file. It's not nearly as special as everyone seems to think. Anything can be put in an include and the include directive can appear anywhere. So yes, it is possible to put commands in an include, or objects, or vehicles, or whatever the hell you please. It is possible to include a file that only consists on CreateObject lines like so:
PHP код:
public OnGameModeInit()
{
#include ..\source\maps\somemap.inc
return 1;
}
Re: Problem or not -
DRIFT_HUNTER - 24.06.2017
Quote:
Originally Posted by StR_MaRy
Hey guys if i would create a rob system and i will put it as a include in pawno/includes then i will add it to my gamemode #include <name of the include> it will be a problem ? or it will be like in gamemode , i will have lag/crash ?
|
Yes that will work, in fact that is how everything is scripted/programmed the right way. Also you dont have to put it into pawno/includes.
Код:
//If you use it like these
#include <something>
//pawno will try to read from pawnp/includes folder
//But if you use it like these
#include "something.pwn"
//It will include file relative to your script (where you are including from)
Re: Problem or not -
StR_MaRy - 24.06.2017
Quote:
Originally Posted by DRIFT_HUNTER
Yes that will work, in fact that is how everything is scripted/programmed the right way. Also you dont have to put it into pawno/includes.
Код:
//If you use it like these
#include <something>
//pawno will try to read from pawnp/includes folder
//But if you use it like these
#include "something.pwn"
//It will include file relative to your script (where you are including from)
|
Yea but i want to compile the gamemode without giving a system online like uploading on your host just the .amx file not the .pwn so if i put it on #include <file name> to read from pawno/includes i wont need to add the .pwn to work and if someone will acces my host account wont steal my work

so that why i asked if i will put it under #include <file name> to read from pawno/includes , will work 100% ok or not

like i said, i tested already and i compiled my gamemode with that include in it and removed from pawno/includes before i opened the server and it worked fine and now i try to wait and see what others have to say if is ok or not.
Re: Problem or not -
Vince - 24.06.2017
You should try compiling with the -l (lowercase L) option once to see for yourself how that shit works. This option only runs the pre-processor and the result you get is what normally gets fed to the actual compiler. Everything that gets included gets compiled into one amx. You NEVER need to upload a raw source file to a live server.
Re: Problem or not -
StR_MaRy - 24.06.2017
Quote:
Originally Posted by Vince
You should try compiling with the -l (lowercase L) option once to see for yourself how that shit works. This option only runs the pre-processor and the result you get is what normally gets fed to the actual compiler. Everything that gets included gets compiled into one amx. You NEVER need to upload a raw source file to a live server.
|
Thx you all , you gived me a lot of info's that will help me