Filterscript doesn't load or something?
#1

I have this filterscript;

Код:
// TELEPORT SYSTEM
#define FILTERSCRIPT
#include <a_samp>
#include <core>
#include <float>
#if defined FILTERSCRIPT
#define COLOR_ORANGE          0xF97804FF
#define COLOR_RED             0xFF808085
public OnPlayerCommandText(playerid, cmdtext[])
{
	new cmd[256];

	if(strcmp(cmd, "/tp", true) == 0) {
	SendClientMessage(playerid,COLOR_ORANGE,"Teleport list");
	SendClientMessage(playerid,COLOR_ORANGE,"/gs /ls /sf /lv /chilliad /lsair /sfair /lvair");
	SendClientMessage(playerid,COLOR_ORANGE,"/sweet /trailer");
	return 1;
	}
	if(strcmp(cmd, "/gs", true) == 0) {
	SetPlayerPos(playerid,2512.0932617188,-1671.1571044922,13.907941818237);
	SendClientMessage(playerid,COLOR_RED,"You have been teleported to Grove Street!");
	return 1;
	}
	if(strcmp(cmd, "/ls", true) == 0) {
	SetPlayerPos(playerid,1280.9606933594,-1338.0102539063,13.654249191284);
    SendClientMessage(playerid,COLOR_RED,"You have been teleported to Los Santos!");
	return 1;
	}
	if(strcmp(cmd, "/sf", true) == 0) {
	SetPlayerPos(playerid,-1985.9775390625,138.49540710449,28.008354187012);
    SendClientMessage(playerid,COLOR_RED,"You have been teleported to San Fierro!");
	return 1;
	}
	if(strcmp(cmd, "/lv", true) == 0) {
	SetPlayerPos(playerid,2003.9881591797,1544.4967041016,13.785161018372);
    SendClientMessage(playerid,COLOR_RED,"You have been teleported to Las Venturas!");
	return 1;
	}
	if(strcmp(cmd, "/chilliad", true) == 0) {
	SetPlayerPos(playerid,-2234.4709472656,-1736.5864257813,481.37677001953);
    SendClientMessage(playerid,COLOR_RED,"You have been teleported to Mount Chilliad!");
    return 1;
    }
    if(strcmp(cmd, "/lsair", true) == 0) {
	SetPlayerPos(playerid,1962.0178222656,-2183.4311523438,13.916575431824);
    SendClientMessage(playerid,COLOR_RED,"You have been teleported to Los Santos Airport!");
	return 1;
	}
 	if(strcmp(cmd, "/sfair", true) == 0) {
	SetPlayerPos(playerid,-1258.97265625,29.321908950806,15.348086357117);
    SendClientMessage(playerid,COLOR_RED,"You have been teleported to San Fierro Airport!");
	return 1;
	}
	if(strcmp(cmd, "/lvair", true) == 0) {
	SetPlayerPos(playerid,1318.8817138672,1252.8098144531,11.167939186096);
 	SendClientMessage(playerid,COLOR_RED,"You have been teleported to Las Venturas Airport!");
	return 1;
	}
	if(strcmp(cmd, "/lspd", true) == 0) {
	SetPlayerPos(playerid,1541.4703369141,-1683.0941162109,14.26225566864);
 	SendClientMessage(playerid,COLOR_RED,"You have been teleported to the Los Santos Police Department!");
	return 1;
	}
	if(strcmp(cmd, "/sweet", true) == 0) {
	SetPlayerPos(playerid,2524.7700000000, -1679.5400000000, 1013.9800000000);
        SetPlayerInterior(playerid, 1);
	SendClientMessage(playerid,COLOR_RED,"You have been teleported to Sweet's interior!");
	return 1;
	}
	if(strcmp(cmd, "/trailer", true) == 0) {
	SetPlayerPos(playerid,1.7900000000, 13.1100000000, 999.7200000000);
	SendClientMessage(playerid,COLOR_RED,"You have been teleported to the Trailer!");
	return 1;
	}
	return 0;
}
#endif
In the console, it says it loads fine, but if I go in game, and try the command /tp, nothing happens, even when I login as RCON, and try it again, doesn't work. I tried doing /rcon loadfs tp but it says it fails?

Need help fixing this.
Reply
#2

try to change the order of filterscripts in your server.cfg file.
Reply
#3

If it doesnt work. Then add a include zcmd. Then replace
Quote:

if(strcmp(cmd, "/tp", true) == 0) {

with this:

Quote:

CMD:tp(playerid,params[]) {

Reply
#4

Quote:
Originally Posted by Compiler
Посмотреть сообщение
If it doesnt work. Then add a include zcmd.
oh yeah try that. (Y)
Reply
#5

Quote:
Originally Posted by Compiler
Посмотреть сообщение
If it doesnt work. Then add a include zcmd. Then replace with this:
This didn't work, could you show me a full code? I have zcmd.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)