Scripts Collecting
#1

Hello Guys...

Today I Got Good Idea:

When You Enter filterscripts You Find Alot of Scripts & Files:


So My Idea Is Can We Collect Important & Required Scripts In One Script


When i Tried To Collect Them I Got Alot of Error:


So Anyone Can Help Me & Explane For Me How To Collect Scripts In One File?
Reply
#2

okay: you have callbacks and variables,

First of all, make in all scripts the variables unique,
so if you have 2x new xxx; make 1 time new Script1_xxx; and second Script2_xxx; and change all other ocurences in the script to match them.

Then you need to copy all public's over, if you have publics with the same names you must put them together.

That's the main proces... :P

I can write about 10 pages how to make the idea you want.
I know how to do it, and BTW, if you have dialog id's and PVARS make sure each script has also unique ids/names.
Reply
#3

Quote:
Originally Posted by gamer_Z
Посмотреть сообщение
okay: you have callbacks and variables,

First of all, make in all scripts the variables unique,
so if you have 2x new xxx; make 1 time new Script1_xxx; and second Script2_xxx; and change all other ocurences in the script to match them.

Then you need to copy all public's over, if you have publics with the same names you must put them together.

That's the main proces... :P

I can write about 10 pages how to make the idea you want.
I know how to do it, and BTW, if you have dialog id's and PVARS make sure each script has also unique ids/names.
So Sorry Like You Know My English is bad So I Don't Understand anything :S
Reply
#4

Here Example



pawn Код:
// IN FIRST FILTERSCRIPT
public OnPlayerCommandText(playerid, cmdtext[])
{
    // **** CUT HERE CUT HERE CUT HERE CUT HERE CUT HERE CUT HERE CUT HERE CUT HERE *****
    if(!strcmp(cmdtext, "/help", true))
    {
        SendClientMessage(playerid, 0xFFFFFFFF, "SERVER: This is the /help command!");
        return 1;
    }
    // **** CUT HERE CUT HERE CUT HERE CUT HERE CUT HERE CUT HERE CUT HERE CUT HERE *****
   
    return 0;
   
}

So you copy the COMMAND from INSIDE the public function,
and paste it INSIDE the public function in the other script


pawn Код:
// IN THE OTHER FILTERSCRIPT
public OnPlayerCommandText(playerid, cmdtext[])
{
    if(!strcmp(cmdtext, "/help", true))
    {
        SendClientMessage(playerid, 0xFFFFFFFF, "SERVER: This is the /help command!");
        return 1;
    }

    if(!strcmp(cmdtext, "/hi", true))
    {
        SendClientMessage(playerid, 0xFFFFFFFF, "SERVER: This is the /hi command!");
        return 1;
    }

    if(!strcmp(cmdtext, "/test", true))
    {
        SendClientMessage(playerid, 0xFFFFFFFF, "SERVER: This is the /test command!");
        return 1;
    }

    if(!strcmp(cmdtext, "/grab", true))
    {
        SendClientMessage(playerid, 0xFFFFFFFF, "SERVER: This is the /grab command!");
        return 1;
    }

    if(!strcmp(cmdtext, "/grub", true))
    {
        SendClientMessage(playerid, 0xFFFFFFFF, "SERVER: This is the /grub command!");
        return 1;
    }
   
   
    // ***** PASTE HERE PASTE HERE PASTE HERE
   
    // >>>>>>>
   
    // *****************************************************
    return 0;
lol,i copied this example from my topic in script discussion
Reply
#5

Quote:
Originally Posted by misho1
Посмотреть сообщение
Here Example



pawn Код:
// IN FIRST FILTERSCRIPT
public OnPlayerCommandText(playerid, cmdtext[])
{
    // **** CUT HERE CUT HERE CUT HERE CUT HERE CUT HERE CUT HERE CUT HERE CUT HERE *****
    if(!strcmp(cmdtext, "/help", true))
    {
        SendClientMessage(playerid, 0xFFFFFFFF, "SERVER: This is the /help command!");
        return 1;
    }
    // **** CUT HERE CUT HERE CUT HERE CUT HERE CUT HERE CUT HERE CUT HERE CUT HERE *****
   
    return 0;
   
}

So you copy the COMMAND from INSIDE the public function,
and paste it INSIDE the public function in the other script


pawn Код:
// IN THE OTHER FILTERSCRIPT
public OnPlayerCommandText(playerid, cmdtext[])
{
    if(!strcmp(cmdtext, "/help", true))
    {
        SendClientMessage(playerid, 0xFFFFFFFF, "SERVER: This is the /help command!");
        return 1;
    }

    if(!strcmp(cmdtext, "/hi", true))
    {
        SendClientMessage(playerid, 0xFFFFFFFF, "SERVER: This is the /hi command!");
        return 1;
    }

    if(!strcmp(cmdtext, "/test", true))
    {
        SendClientMessage(playerid, 0xFFFFFFFF, "SERVER: This is the /test command!");
        return 1;
    }

    if(!strcmp(cmdtext, "/grab", true))
    {
        SendClientMessage(playerid, 0xFFFFFFFF, "SERVER: This is the /grab command!");
        return 1;
    }

    if(!strcmp(cmdtext, "/grub", true))
    {
        SendClientMessage(playerid, 0xFFFFFFFF, "SERVER: This is the /grub command!");
        return 1;
    }
   
   
    // ***** PASTE HERE PASTE HERE PASTE HERE
   
    // >>>>>>>
   
    // *****************************************************
    return 0;
NiCe Help I Think I Understand This
Reply
#6

It will take you sometime to merge them all togther. Some parts you will need to delete.
I think what you did is, copied and pasted all of hte script and added it in the button, but if you need any help
ask
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)