Filterscript aint working
#1

Filterscript Make all other commands not work Whats wrong


PHP код:
// Area 51 lift System, Made by Tom.1412
// Don't remove credits
// If you want more Doors/Gates made, Message me on samp.
#include <a_samp>
#define FILTERSCRIPT
#define Error_Color 0xAA3333AA
#define Message_Close_Color 0x33AA33AA
#define Close_Message " Welcome Home Wizzard! (Gates Created By Kepa) "
#if defined FILTERSCRIPT
#endif
new Gate1a;
forward CloseGate1AtoD(playerid);
forward CloseGate2AnB(playerid);
public 
OnFilterScriptInit()
{
    print(
"\n--------------------------------------");
    print(
" wizarddoor");
    print(
"--------------------------------------\n");
    
Gate1a CreateObject(971,321.10000610,-1188.59997559,76.30000305,0.00000000,0.00000000,38.00000000);
    return 
1;
}
public 
CloseGate1AtoD(playerid)
{
    
MoveObject(Gate1a138.0488281251946.974609375181);
    
SendClientMessage(playeridMessage_Close_ColorClose_Message);
    return 
1;
}
public 
OnPlayerCommandText(playeridcmdtext[])
{
    if(!
strcmp(cmdtext"/wizdoor"true))
    {
        if(
IsPlayerInRangeOfPoint(playerid10.0321.10000610, -1188.5999755976.30000305))
         {
            
MoveObject(Gate1a321.10000610, -1188.5999755976.300003051);
            
SetTimer("CloseGate1AtoD"10000false);
        }
        else 
SendClientMessage(playeridError_Color" You Are Not Near Wiz House.");
    }
     return 
1;

Reply
#2

are you using zcmd in other commands?
if yes, then change this one too to zcmd.
Reply
#3

Please explain some more and how i change it
Reply
#4

if(!strcmp(cmdtext, "/wizdoor", true))



ZMC:wizdoor(playerid, params[])
But since you use a ravens edit I dont think you use ZCMD,


And why make it a filterscript?
Just copy it to your gamemode
Reply
#5

Quote:
Originally Posted by miley1
Посмотреть сообщение
Please explain some more and how i change it
by using zcmd and the standard cmd together they mess each other up and make all of the commands not work
Reply
#6

pawn Код:
public OnPlayerCommandText(playerid, cmdtext[])
{
    if(!strcmp(cmdtext, "/wizdoor", true))
    {
        if(IsPlayerInRangeOfPoint(playerid, 10.0, 321.10000610, -1188.59997559, 76.30000305))
        {
            MoveObject(Gate1a, 321.10000610, -1188.59997559, 76.30000305, 1);
            SetTimer("CloseGate1AtoD", 10000, false);
        }
        else SendClientMessage(playerid, Error_Color, " You Are Not Near Wiz House.");
    }
     return 0; // it was 1, I changed it to 0 as it is a filterscript
}
Edit: commands in filterscripts look like that
pawn Код:
public OnPlayerCommandText(playerid, cmdtext[])
{
         if(.........)
         {
                  // your command stuff here
                  return 1;
         }
         return 0; // OnPlayerCommandText should return 0 in filterscripts
}
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)