SA-MP Forums Archive
[HELP] Please help me. - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+---- Forum: Help Archive (https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: [HELP] Please help me. (/showthread.php?tid=217407)



[HELP] Please help me. - Joey_Griffiths - 27.01.2011

Im a noob scripter, seriously a NOOB, I'm following this tutorial, https://sampforum.blast.hk/showthread.php?tid=177490.

Here is my code, I am getting an error, can someone please help me?

----------------------------------------
#include <a_samp>
#include <gl_spawn>
main()
{
print("STARTED");
}
public OnGameModeInit()
{
print("GM Started");
}
public OnFilterScriptInit()
{
print("FS Started);

}
new VAR_NAME;
newbool:VAR_NAME=false;
new VAR_NAME=STRING;
new VAR_NAME="Just Some Text";
new [MAX_PLAYER]="Just Some Text";
----------------------------------------

That's all of my code.


Re: [HELP] Please help me. - bartje01 - 27.01.2011

Yeah I don't understand your code.

When you make your first script,
Just open pawno and click on new file in the left upper cornor.


Re: [HELP] Please help me. - Joey_Griffiths - 27.01.2011

I want to make one from scratch.


Re: [HELP] Please help me. - Larsey123IsMe - 27.01.2011

pawn Код:
#include <a_samp>

//all the "new" on top
//example
new IsSpawned;

public OnGameModeInit() // If you make a GameMode
{
     print("GM STARTED");
}

public OnFilterScriptInit() // If you make a FilterScript
{
     print("FS STARTED");
}

public OnPlayerCommandText(playerid, cmdtext[]) //Example Command
{
     if(!strcmp(cmdtext, "/kill", true))
     {
          SetPlayerHealth(playerid, 0);
          return 1;
     }
     return 0;
}



Re: [HELP] Please help me. - TheYoungCapone - 27.01.2011

if its a gamemode use public OnGameModeInit()
if its a filterscript use public OnFilterScriptInit()


Re: [HELP] Please help me. - PeteShag - 27.01.2011

pawn Код:
public OnGameModeInit()//Use this if this is a Gamemode
{
print("GM Started");
}
//+++++++++++++++++++++++++++++++++
public OnFilterScriptInit()//use this if it's a OnFilterScript
{
print("FS Started);

}
Put these
pawn Код:
new VAR_NAME;
newbool:VAR_NAME=false;
new VAR_NAME=STRING;
new VAR_NAME="Just Some Text";
new [MAX_PLAYER]="Just Some Text";
before main()

EDIT: Too slow.


Re: [HELP] Please help me. - Joey_Griffiths - 27.01.2011

OOh an Atheist, same here, and Im confused with your reply PeteShag. :P


Re: [HELP] Please help me. - PeteShag - 27.01.2011

pawn Код:
new VAR_NAME;
newbool:VAR_NAME=false;
new VAR_NAME=STRING;
new VAR_NAME="Just Some Text";
new [MAX_PLAYER]="Just Some Text";
What are you trying to achieve ?


Re: [HELP] Please help me. - Larsey123IsMe - 27.01.2011

Quote:
Originally Posted by Joey_Griffiths
Посмотреть сообщение
OOh an Atheist, same here, and Im confused with your reply PeteShag. :P
With this:
pawn Код:
new VAR_NAME;
new bool:VAR_NAME=false;
new VAR_NAME=STRING;
new VAR_NAME="Just Some Text";
new [MAX_PLAYER]="Just Some Text";
He mean you should put it under
pawn Код:
#include <a_samp>



Re: [HELP] Please help me. - Joey_Griffiths - 27.01.2011

#include <a_samp>
#include <gl_spawn>
#include <gl_common>
new VAR_NAME;
newbool:VAR_NAME=false;
new VAR_NAME=STRING;
new VAR_NAME="Just Some Text";
new [MAX_PLAYER]="Just Some Text";
main()
{
print("STARTED");
}
public OnGameModeInit()
{
print("GM Started");
}
public OnFilterScriptInit()
{
Print("FS Started);
}

That's the code now and I still get errors.