#define FILTERSCRIPT
#include <a_samp>
#if defined FILTERSCRIPT
#define COLOR_WHITE 0xFFFFFFFF
public OnFilterScriptInit()
{
  print("\n--------------------------------------");
  print(" Blank Filterscript by your name here");
  print("--------------------------------------\n");
  return 1;
}
public OnFilterScriptExit()
{
  return 1;
}
#endif
public OnPlayerConnect(playerid)
{
  return 1;
}
public OnPlayerDisconnect(playerid, reason)
{
  return 1;
}
public OnPlayerSpawn(playerid)
{
  return 1;
}
public OnPlayerDeath(playerid, killerid, reason)
{
  return 1;
}
public OnVehicleSpawn(vehicleid)
{
  return 1;
}
public OnVehicleDeath(vehicleid, killerid)
{
  return 1;
}
public OnPlayerText(playerid, text[])
{
  return 1;
}
public OnPlayerCommandText(playerid, cmdtext[])
{
  new string[256];
  new cmd[256];
  new tmp[256];
  new giveplayerid, moneys, idx;
  cmd = strtok(cmdtext, idx);
 Â
  if (strcmp(cmd, "/gethere", true) == 0)
  {
   if(IsPlayerConnected(playerid))
   {
        tmp = strtok(cmdtext, idx);
        if(!strlen(tmp))
        {
          SendClientMessage(playerid, COLOR_WHITE, "USAGE: /gethere [playerid/PartOfName]");
          return 1;
        }
        //giveplayerid = strval(tmp);
        giveplayerid = ReturnUser(tmp);
        if(IsPlayerConnected(giveplayerid))
        {
         if(giveplayerid != INVALID_PLAYER_ID)
         {
           // Message
          new name[MAX_PLAYER_NAME], string[48];
              GetPlayerName(targetid, name, sizeof(name));
              /*format(string, sizeof(string), "%s has joined the server.", name );
              SendClientMessageToAll(0xFFFF00AA, string);*/
              SendClientMessage(playerid, COLOR_WHITE, "You have teleported %s to your location", name);
             Â
              // Message 2
              new name1[MAX_PLAYER_NAME], string[48];
              GetPlayerName(playerid, name1, sizeof(name1));
              /*format(string, sizeof(string), "%s has joined the server.", name1 );
              SendClientMessageToAll(0xFFFF00AA, string);*/
              SendClientMessage(targetid, COLOR_WHITE, "%s has teleported you to his location", name1);
Â
              // Gethere Command Itself
              new Float:x, Float:y, Float:z;
              GetPlayerPos(playerid, x, y, z);
              SetPlayerPos(targetid, x, y, z);
            }
          }
        }
        else
        {
          SendClientMessage(playerid, COLOR_WHITE, "This player is not online");
        }
      }
    }
    return 1;
  }
  if (strcmp(cmd, "/goto", true) == 0)
  {
   if(IsPlayerConnected(playerid))
   {
        tmp = strtok(cmdtext, idx);
        if(!strlen(tmp))
        {
          SendClientMessage(playerid, COLOR_WHITE, "USAGE: /goto [playerid/PartOfName]");
          return 1;
        }
        //giveplayerid = strval(tmp);
        giveplayerid = ReturnUser(tmp);
        if(IsPlayerConnected(giveplayerid))
        {
         if(giveplayerid != INVALID_PLAYER_ID)
         {
       // Message
          new name[MAX_PLAYER_NAME], string[48];
              GetPlayerName(targetid, name, sizeof(name));
              /*format(string, sizeof(string), "%s has joined the server.", name );
              SendClientMessageToAll(0xFFFF00AA, string);*/
              SendClientMessage(playerid, COLOR_WHITE, "You have teleported to %s location", name);
              // Message 2
              new name1[MAX_PLAYER_NAME], string[48];
              GetPlayerName(playerid, name1, sizeof(name1));
              /*format(string, sizeof(string), "%s has joined the server.", name1 );
              SendClientMessageToAll(0xFFFF00AA, string);*/
              SendClientMessage(targetid, COLOR_WHITE, "%s has teleported to your location", name1);
             Â
              // Goto Command Itself
              new Float:x, Float:y, Float:z;
              GetPlayerPos(targetid, x, y, z);
              SetPlayerPos(playerid, x, y, z);
            }
          }
        }
        else
        {
          SendClientMessage(playerid, COLOR_WHITE, "This player is not online");
        }
      }
    }
    return 1;
  }
  return 0;
}
public OnPlayerEnterVehicle(playerid, vehicleid, ispassenger)
{
  return 1;
}
public OnPlayerExitVehicle(playerid, vehicleid)
{
  return 1;
}
public OnPlayerStateChange(playerid, newstate, oldstate)
{
  return 1;
}
public OnPlayerEnterCheckpoint(playerid)
{
  return 1;
}
public OnPlayerLeaveCheckpoint(playerid)
{
  return 1;
}
public OnPlayerEnterRaceCheckpoint(playerid)
{
  return 1;
}
public OnPlayerLeaveRaceCheckpoint(playerid)
{
  return 1;
}
public OnRconCommand(cmd[])
{
  return 1;
}
public OnPlayerRequestSpawn(playerid)
{
  return 1;
}
public OnObjectMoved(objectid)
{
  return 1;
}
public OnPlayerObjectMoved(playerid, objectid)
{
  return 1;
}
public OnPlayerPickUpPickup(playerid, pickupid)
{
  return 1;
}
public OnVehicleMod(playerid, vehicleid, componentid)
{
  return 1;
}
public OnVehiclePaintjob(playerid, vehicleid, paintjobid)
{
  return 1;
}
public OnVehicleRespray(playerid, vehicleid, color1, color2)
{
  return 1;
}
public OnPlayerSelectedMenuRow(playerid, row)
{
  return 1;
}
public OnPlayerExitedMenu(playerid)
{
  return 1;
}
public OnPlayerInteriorChange(playerid, newinteriorid, oldinteriorid)
{
  return 1;
}
public OnPlayerKeyStateChange(playerid, newkeys, oldkeys)
{
  return 1;
}
public OnRconLoginAttempt(ip[], password[], success)
{
  return 1;
}
public OnPlayerUpdate(playerid)
{
  return 1;
}
public OnPlayerStreamIn(playerid, forplayerid)
{
  return 1;
}
public OnPlayerStreamOut(playerid, forplayerid)
{
  return 1;
}
public OnVehicleStreamIn(vehicleid, forplayerid)
{
  return 1;
}
public OnVehicleStreamOut(vehicleid, forplayerid)
{
  return 1;
}
public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
{
  return 1;
}
public OnPlayerClickPlayer(playerid, clickedplayerid, source)
{
  return 1;
}
strtok(const string[], &index)
{
  new length = strlen(string);
  while ((index < length) && (string[index] <= ' '))
  {
    index++;
  }
  new offset = index;
  new result[20];
  while ((index < length) && (string[index] > ' ') && ((index - offset) < (sizeof(result) - 1)))
  {
    result[index - offset] = string[index];
    index++;
  }
  result[index - offset] = EOS;
  return result;
}
C:\Users\Torran\Documents\TDH\filterscripts\goto and gethere.pwn(61) : warning 219: local variable "string" shadows a variable at a preceding level C:\Users\Torran\Documents\TDH\filterscripts\goto and gethere.pwn(78) : error 017: undefined symbol "ReturnUser" C:\Users\Torran\Documents\TDH\filterscripts\goto and gethere.pwn(84) : warning 219: local variable "name" shadows a variable at a preceding level C:\Users\Torran\Documents\TDH\filterscripts\goto and gethere.pwn(84) : warning 219: local variable "string" shadows a variable at a preceding level C:\Users\Torran\Documents\TDH\filterscripts\goto and gethere.pwn(85) : error 017: undefined symbol "targetid" C:\Users\Torran\Documents\TDH\filterscripts\goto and gethere.pwn(88) : warning 202: number of arguments does not match definition C:\Users\Torran\Documents\TDH\filterscripts\goto and gethere.pwn(91) : warning 219: local variable "name1" shadows a variable at a preceding level C:\Users\Torran\Documents\TDH\filterscripts\goto and gethere.pwn(91) : error 021: symbol already defined: "string" C:\Users\Torran\Documents\TDH\filterscripts\goto and gethere.pwn(95) : error 017: undefined symbol "targetid" C:\Users\Torran\Documents\TDH\filterscripts\goto and gethere.pwn(98) : warning 219: local variable "x" shadows a variable at a preceding level C:\Users\Torran\Documents\TDH\filterscripts\goto and gethere.pwn(98) : warning 219: local variable "y" shadows a variable at a preceding level C:\Users\Torran\Documents\TDH\filterscripts\goto and gethere.pwn(98) : warning 219: local variable "z" shadows a variable at a preceding level C:\Users\Torran\Documents\TDH\filterscripts\goto and gethere.pwn(100) : error 017: undefined symbol "targetid" C:\Users\Torran\Documents\TDH\filterscripts\goto and gethere.pwn(91) : warning 204: symbol is assigned a value that is never used: "string" C:\Users\Torran\Documents\TDH\filterscripts\goto and gethere.pwn(84) : warning 204: symbol is assigned a value that is never used: "string" C:\Users\Torran\Documents\TDH\filterscripts\goto and gethere.pwn(64) : warning 203: symbol is never used: "moneys" C:\Users\Torran\Documents\TDH\filterscripts\goto and gethere.pwn(61) : warning 204: symbol is assigned a value that is never used: "string" C:\Users\Torran\Documents\TDH\filterscripts\goto and gethere.pwn(61 -- 109) : warning 209: function "OnPlayerCommandText" should return a value C:\Users\Torran\Documents\TDH\filterscripts\goto and gethere.pwn(61 -- 110) : error 010: invalid function or declaration C:\Users\Torran\Documents\TDH\filterscripts\goto and gethere.pwn(61 -- 112) : error 010: invalid function or declaration C:\Users\Torran\Documents\TDH\filterscripts\goto and gethere.pwn(61 -- 112) : fatal error 107: too many error messages on one line Compilation aborted.Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase 8 Errors.
C:\Users\Torran\Documents\TDH\filterscripts\goto and gethere.pwn(90) : warning 202: number of arguments does not match definition C:\Users\Torran\Documents\TDH\filterscripts\goto and gethere.pwn(97) : warning 202: number of arguments does not match definition C:\Users\Torran\Documents\TDH\filterscripts\goto and gethere.pwn(66) : warning 203: symbol is never used: "moneys" C:\Users\Torran\Documents\TDH\filterscripts\goto and gethere.pwn(63) : warning 204: symbol is assigned a value that is never used: "string" C:\Users\Torran\Documents\TDH\filterscripts\goto and gethere.pwn(63 -- 111) : warning 209: function "OnPlayerCommandText" should return a value C:\Users\Torran\Documents\TDH\filterscripts\goto and gethere.pwn(63 -- 112) : error 010: invalid function or declaration C:\Users\Torran\Documents\TDH\filterscripts\goto and gethere.pwn(63 -- 114) : error 010: invalid function or declaration C:\Users\Torran\Documents\TDH\filterscripts\goto and gethere.pwn(63 -- 116) : error 010: invalid function or declaration C:\Users\Torran\Documents\TDH\filterscripts\goto and gethere.pwn(63 -- 116) : fatal error 107: too many error messages on one line Compilation aborted.Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase 4 Errors.
|
Originally Posted by Donny
You are using SendClientMessage incorrectly, it's "(playerid, colour, message)" and you have a random bracket around line 100.
|