[SOLVED] Filterscript Commands Not Working -
Gimax - 07.07.2009
Facts:
1. Server is running, players are connected
2. Filterscript has no errors or warnings
3. Filterscript is loaded
4. Gamemode has no errors or warnings
5. /testskin is working, teleports player to Binco
6. /test is not working, server returns 'Unknown command' message
7. /mycommand not working either
8. DCMD is not problem... i implemented DCMD in a_samp include and it works in GM
9. All other things in other FS work, just commands that are in FSs wont work, in any of them
10. Only 4 FS loaded
Tried Fixes:
1. Changing returns to 0/1 etc.
Solved:
1. Don't load FilterScript in OnGamemodeInit
2. There was a broken function inside script that blocked all other things
3. OnPlayerCOmamndText should return 0 value in each FS
GAMEMODE COMMAND - WOKING
Code:
dcmd_testskin(playerid,params[])
{
#pragma unused params
SendClientMessage(playerid,green," Binco Test Point!");
SetPlayerPos(playerid,215.4698,-99.7461,1006.2578);
SetPlayerFacingAngle(playerid,0);
SetPlayerVirtualWorld(playerid,0);
SetPlayerInterior(playerid,15);
SetCameraBehindPlayer(playerid);
return 1;
}
Code:
public OnPlayerCommandText(playerid, cmdtext[])
{
dcmd(testskin,8,cmdtext);
return 0;
}
FILTERSCRIPT COMMAND - "SERVER: Unknown command"
Code:
dcmd_test(playerid,params[])
{
#pragma unused params
SendClientMessage(playerid,green,"Test Sucessful!");
return 1;
}
Code:
public OnPlayerCommandText(playerid, cmdtext[])
{
dcmd(test,4,cmdtext);
return 0;
}
I am scripter for too long time and i can't find the freaking problem, rofl...
Any info or suggestions are taken! Thank you!
Re: [HELP REQUEST[ Filterscript Commands Not Working -
refshal - 07.07.2009
Try this:
pawn Code:
dcmd_test(playerid,params[])
{
#pragma unused params
SendClientMessage(playerid,green,"Test Sucessful!");
return 1;
}
Just a suggestion. Otherwise it looks fine.
Re: [HELP REQUEST[ Filterscript Commands Not Working -
Gimax - 07.07.2009
i modified it, i didnt write that #params line before, and its not working =(
Re: [HELP REQUEST] Filterscript Commands Not Working -
refshal - 07.07.2009
Then try to show me the whole filterscript. Then I'll fix it for you.
Re: [HELP REQUEST] Filterscript Commands Not Working -
happyface - 07.07.2009
it could be the gamemode giving the error because it does not see that command, and do you have dcmd defined in the filterscript?
Re: [HELP REQUEST] Filterscript Commands Not Working -
Gimax - 07.07.2009
Code:
#include <a_samp>
#define FILTERSCRIPT
public OnFilterScriptInit()
{
return 1;
}
public OnFilterScriptExit()
{
return 1;
}
public OnGameModeInit()
{
return 1;
}
public OnGameModeExit()
{
return 1;
}
dcmd_test(playerid,params[])
{
#pragma unused params
SendClientMessage(playerid,green,"Test sucessful");
return 1;
}
public OnPlayerRequestClass(playerid, classid)
{
return 1;
}
public OnPlayerRequestSpawn(playerid)
{
return 1;
}
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 OnPlayerPrivmsg(playerid, recieverid, text[])
{
return 1;
}
public OnPlayerCommandText(playerid, cmdtext[])
{
dcmd(test,4,cmdtext);
if (strcmp("/mycommand", cmdtext, true, 10) == 0)
{
SendClientMessage(playerid,red,"Nothing!");
return 1;
}
return 0;
}
public OnPlayerInfoChange(playerid)
{
return 1;
}
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 OnObjectMoved(objectid)
{
return 1;
}
public OnPlayerObjectMoved(playerid, objectid)
{
return 1;
}
public OnPlayerPickUpPickup(playerid, pickupid)
{
return 1;
}
public OnPlayerSelectedMenuRow(playerid, row)
{
return 1;
}
public OnPlayerExitedMenu(playerid)
{
return 1;
}
public OnVehicleMod(vehicleid, componentid)
{
return 1;
}
public OnVehiclePaintjob(vehicleid, paintjobid)
{
return 1;
}
public OnVehicleRespray(vehicleid, color1, color2)
{
return 1;
}
public OnPlayerInteriorChange(playerid, newinteriorid, oldinteriorid)
{
return 1;
}
its just blank new.pwn defined as Filterscript and with 2 commands that don't want to work
Re: [HELP REQUEST] Filterscript Commands Not Working -
happyface - 07.07.2009
so can you show us some more of the code, can we see your OnPlayerCommandText from your filterscript
Re: [HELP REQUEST] Filterscript Commands Not Working -
Gimax - 07.07.2009
thats all, i was testing if it gonan work now cause i had same problem before
Re: [HELP REQUEST] Filterscript Commands Not Working -
Haegon - 07.07.2009
Code:
dcmd_test(playerid,params[])
{
#pragma unused params
{
SendClientMessage(playerid,green,"Test Sucessful!");
}
return 1;
}
Try that.
Don't know if it will make a difference, but it is worth a shot.
Re: [HELP REQUEST] Filterscript Commands Not Working -
Klutty - 07.07.2009
You don't have the DCMD define line.
Re: [HELP REQUEST] Filterscript Commands Not Working -
Gimax - 07.07.2009
Quote:
Originally Posted by [eX
Klutty ]
You don't have the DCMD define line.
|
/mycommand not working either
so dcmd is not problem... i implented DCMD in a_samp include
i said that before
Re: [HELP REQUEST] Filterscript Commands Not Working -
Klutty - 07.07.2009
Quote:
Originally Posted by Gimax
Quote:
Originally Posted by [eX
Klutty ]
You don't have the DCMD define line.
|
/mycommand not working either
so dcmd is not problem... i implented DCMD in a_samp include
i said that before
|
Oh, I apologise.
Re: [HELP REQUEST] Filterscript Commands Not Working -
happyface - 07.07.2009
pawn Код:
#define dcmd(%1,%2,%3) if ((strcmp((%3)[1], #%1, true, (%2)) == 0) && ((((%3)[(%2) + 1] == 0) && (dcmd_%1(playerid, "")))||(((%3)[(%2) + 1] == 32) && (dcmd_%1(playerid, (%3)[(%2) + 2]))))) return 1
pawn Код:
public OnPlayerCommandText(playerid, cmdtext[])
{
dcmd(test,4,cmdtext);
if (strcmp("/mycommand", cmdtext, true, 10) == 0)
{
SendClientMessage(playerid,0x008040FF,"Nothing!");
return 1;
}
return 0;
}
pawn Код:
dcmd_test(playerid,params[])
{
#pragma unused params
SendClientMessage(playerid,0x008040FF,"Test sucessful");
return 1;
}
Re: [HELP REQUEST] Filterscript Commands Not Working -
refshal - 07.07.2009
Quote:
Originally Posted by happyface
pawn Код:
#define dcmd(%1,%2,%3) if ((strcmp((%3)[1], #%1, true, (%2)) == 0) && ((((%3)[(%2) + 1] == 0) && (dcmd_%1(playerid, "")))||(((%3)[(%2) + 1] == 32) && (dcmd_%1(playerid, (%3)[(%2) + 2]))))) return 1
|
If he didn't define that, he would get an error with his DCMD's.
Re: [HELP REQUEST] Filterscript Commands Not Working -
Gimax - 07.07.2009
Same c*ap -.- .. i updated FACTS on top of topic, check them
and DCMD was defined in a_samp same as colors, all works in GM file but not in FSs
Re: [HELP REQUEST] Filterscript Commands Not Working -
yezizhu - 07.07.2009
How many fs are loaded in your server?
Re: [HELP REQUEST] Filterscript Commands Not Working -
Gimax - 07.07.2009
4
Re: [SOLVED] Filterscript Commands Not Working -
Gimax - 07.07.2009
solved the problems!
read on first post
Re: [SOLVED] Filterscript Commands Not Working -
AmirMooshok - 07.07.2009
Hi All
i From Iraq
i for Add admins , Setup this plugin in this topic
http://forum.sa-mp.com/index.php?topic=91403.0
and i setup it
and filterscript loaded but the it's commands not working
i type /rcon /giveadmin
but it not working or i type /register or /login but these not working
please Help Me FaST !!!!
AmirMooshok
Re: [SOLVED] Filterscript Commands Not Working -
refshal - 07.07.2009
Quote:
Originally Posted by AmirMooshok
Hi All
i From Iraq
i for Add admins , Setup this plugin in this topic http://forum.sa-mp.com/index.php?topic=91403.0
and i setup it
and filterscript loaded but the it's commands not working
i type /rcon /giveadmin
but it not working or i type /register or /login but these not working
please Help Me FaST !!!!
AmirMooshok
|
Ask in the script's thread.