[FilterScript] [FS] Simple /getallplayers
#1

Bens Product Presents Getallplayers here!!
commands! : /getallplayers


Images Soon!

Paste Bin : http://pastebin.com/d7f705fbc
Reply
#2

lol this should go into usefull commands not FS...
Reply
#3

And it\'s not working...

Undefined Symbol: x, y & z
Reply
#4

It will work if you put it in your gm
Reply
#5

it dose work. Complie it And test.
Reply
#6

No, it wont. You did NOT define x, y and z

Code:
public OnPlayerCommandText(playerid, cmdtext[])
{
  if(strcmp(cmdtext, "/getallplayers", true) == 0) 
  {
    for(new i=0; i<MAX_PLAYERS; i++)
    {
     if(IsPlayerConnected(i)) 
     {
       GetPlayerPos(playerid,x,y,z);
       SetPlayerPos(i,x,y,z+10);
     }
    }
    return 1;
  }
  return 0;
}
So where is the
Code:
new Float:x, Float:y, Float:z;
??
Reply
#7

It works for me soo
Reply
#8

Quote:
Originally Posted by popben
It works for me soo
Oh, i believe you. But did you \'released\' this commando for yourself, or for the others?
In the last case, this won\'t work for them

Reply
#9

Sandra is right guys, because you haven;t defined it in the script YOU RELEASED.
You may have defined it in the gm, but not in the pastebin.
And it is quite simple / easy. So not worth to be called an fs.
Reply
#10

What is that a filterscript, tought.
Reply
#11

useful commands..
Reply
#12

I fixed it for you, and deleted a lot of crap from it >.>

pawn Code:
#include <a_samp>
#define FILTERSCRIPT
#if defined FILTERSCRIPT

    new Float:x, Float:y, Float:z;

public OnFilterScriptInit()
{
    return 1;
}

public OnFilterScriptExit()
{
    return 1;
}

#else
#endif

public OnPlayerCommandText(playerid, cmdtext[])
{
    if(strcmp(cmdtext, "/getallplayers", true) == 0)
        {
    for(new i=0; i<MAX_PLAYERS; i++)
            {
            GetPlayerPos(playerid,x,y,z);
            if(IsPlayerConnected(i))
                {
                SetPlayerPos(i,x,y,z+10);
                }
            }
        return 1;
        }
    return 0;
}
It compiled, but I haven\'t tested it....
Reply
#13

Code:
#define FILTERSCRIPT
#if defined FILTERSCRIPT
#endif
Why is that in there?

Reply
#14

To keep it looking remotely like an ordinary the default filterscript.. probably unnecessary.. At least I got rid of 90% of the crap >.>
Reply
#15

The best advise is , not to use this as an fs, copy the command and defines in gm or other existing fs.
Reply
#16

Quote:
Originally Posted by Rks_
The best advise is , not to use this as an fs, copy the command and defines in gm or other existing fs.
Orly, well it would be a waste of space as a fs :P
Reply
#17

duh.
pawn Code:
#include <a_samp>
public OnPlayerCommandText(playerid, cmdtext[])
{
  if(strcmp(cmdtext, "/getallplayers", true) == 0 && IsPlayerAdmin(playerid))
  {
    for(new i=0; i<MAX_PLAYERS; i++)
    {
      GetPlayerPos(playerid,x,y,z);
      if(IsPlayerConnected(i))
      {
        SetPlayerPos(i,x,y,z+10);
      }
    }
    return 1;
  }
  return 0;
}
Reply
#18

note: x,y,z isn\'t defined, which will simply result in 3 error\'s 017
Reply
#19

Quote:
Originally Posted by Rks_
note: x,y,z isn\'t defined, which will simply result in 3 error\'s 017
Hence my fix on the previous page... And I agree with some of the other posters, this is more of a "useful function" than a standalone Filterscript. With the 16 FS limit, if you use FS\'s this size, you will reach your quote in no time..
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)