BAD PARAMETER COUNT (gates)
#1

Hiho everyone. so this is the story...i have gamemode and everything works but when i add my gate filterscript (absolutely no eror) comands from gamemode dont work and only comands from the script do. i can post the script if u want.
i apreciate all help

EDIT:btw it says count is 13 should be 11
count is 7 should be 5..........HELL i dont see any of those numbers in my script.........
Reply
#2

yeah, post the script
Reply
#3

here it is
#include <a_samp>

#pragma tabsize 0
#define COLOR_YELLOW 0xFFFF00AA
#define FILTERSCRIPT
forward GateClose();
#if defined FILTERSCRIPT
new pdgate;
new lod;
new vrata;
new vchod;
public OnFilterScriptInit()
{
pdgate= CreateObject(980,-717.388733, 956.385986, 13.906204, 0.0000, 0.0000, 88.2811);
lod= CreateObject(2755, -1374.510498, 1491.363525, 11.545547, 0.0000, 0.0000, 270.0000);
vrata= CreateObject(987, -712.729919, 844.137390, 13.733120, 0.0000, 357.4217, 133.2039);
vchod= CreateObject(8536, 1015.318542, 1224.709717, 17.068413, 0.0000, 0.0000, 90.0000);

return 1;
}


public OnFilterScriptExit()
{
return 1;
}

#endif

public OnPlayerCommandText(playerid, cmdtext[])
{
if (strcmp(cmdtext, "/open", true)==0)
if(IsPlayerAdmin(playerid))
{
MoveObject(pdgate,-717.388733, 970.385986, 13.906204,3.5);
SendClientMessage(playerid, COLOR_YELLOW,"Brana otevrena");
return 1;
}
if (strcmp(cmdtext, "/close", true)==0)
if(IsPlayerAdmin(playerid))
{
MoveObject(pdgate,-717.388733, 956.385986, 13.906204,3.5);
SendClientMessage(playerid, COLOR_YELLOW,"Brana zavrena");
return 1;
}
if (strcmp(cmdtext,"/openl",true)==0)
if(IsPlayerAdmin(playerid))
{
MoveObject(lod, -1374.510498, 1491.363525, 15.545547,3.5);
SendClientMessage(playerid, COLOR_YELLOW,"Brana otevrena");
return 1;
}
if (strcmp(cmdtext, "/closel", true)==0)
if(IsPlayerAdmin(playerid))
{
MoveObject(lod, -1374.510498, 1491.363525, 11.545547,3.5);
SendClientMessage(playerid, COLOR_YELLOW,"Brana zavrena");
return 1;
}

if (strcmp(cmdtext,"/open 777",true)==0)
{
MoveObject(vrata,-712.729919, 844.137390, 17.733120,3.5);
SendClientMessage(playerid, COLOR_YELLOW,"Brana otevrena");
return 1;
}
if (strcmp(cmdtext, "/close 777", true)==0)
{
MoveObject(vrata, -712.729919, 844.137390, 13.733120,3.5);
SendClientMessage(playerid, COLOR_YELLOW,"Brana zavrena");
return 1;
}
if (strcmp(cmdtext, "/open 985", true)==0)
{
MoveObject(vchod, 1015.318542, 1224.709717, 27.068413,10);
SendClientMessage(playerid, COLOR_YELLOW,"Pristup povolen");
return 1;
}
if (strcmp(cmdtext, "/close 985", true)==0)
{
MoveObject(vchod, 1015.318542, 1224.709717, 17.068413,10);
SendClientMessage(playerid, COLOR_YELLOW,"Vchod zavren");
return 1;
}
return 1;
}
Reply
#4

it should be return 0; at the end
Reply
#5

pawn Код:
#include <a_samp>

#pragma tabsize 0
#define COLOR_YELLOW 0xFFFF00AA
#define FILTERSCRIPT
forward GateClose();
#if defined FILTERSCRIPT
new pdgate;
new lod;
new vrata;
new vchod;

public OnFilterScriptInit()
{
pdgate = CreateObject(980,-717.388733, 956.385986, 13.906204, 0.0000, 0.0000, 88.2811);
lod = CreateObject(2755, -1374.510498, 1491.363525, 11.545547, 0.0000, 0.0000, 270.0000);
vrata = CreateObject(987, -712.729919, 844.137390, 13.733120, 0.0000, 357.4217, 133.2039);
vchod = CreateObject(8536, 1015.318542, 1224.709717, 17.068413, 0.0000, 0.0000, 90.0000);
return 1;
}


public OnFilterScriptExit()
{
 return 1;
}

#endif

public OnPlayerCommandText(playerid, cmdtext[])
{

if (strcmp(cmdtext, "/open", true)==0)
{
    if(IsPlayerAdmin(playerid))
   {
   MoveObject(pdgate,-717.388733, 970.385986, 13.906204,3.5);
   SendClientMessage(playerid, COLOR_YELLOW,"Brana otevrena");
   return 1;
   }
   if (strcmp(cmdtext, "/close", true)==0)
    if(IsPlayerAdmin(playerid))
   {
   MoveObject(pdgate,-717.388733, 956.385986, 13.906204,3.5);
   SendClientMessage(playerid, COLOR_YELLOW,"Brana zavrena");
   return 1;
   }
if (strcmp(cmdtext,"/openl",true)==0)
 if(IsPlayerAdmin(playerid))
   {
  MoveObject(lod, -1374.510498, 1491.363525, 15.545547,3.5);
   SendClientMessage(playerid, COLOR_YELLOW,"Brana otevrena");
   return 1;
      }
   if (strcmp(cmdtext, "/closel", true)==0)
    if(IsPlayerAdmin(playerid))
   {
   MoveObject(lod, -1374.510498, 1491.363525, 11.545547,3.5);
   SendClientMessage(playerid, COLOR_YELLOW,"Brana zavrena");
   return 1;
   }

if (strcmp(cmdtext,"/open 777",true)==0)
 {
  MoveObject(vrata,-712.729919, 844.137390, 17.733120,3.5);
   SendClientMessage(playerid, COLOR_YELLOW,"Brana otevrena");
   return 1;
      }
if (strcmp(cmdtext, "/close 777", true)==0)
   {
   MoveObject(vrata, -712.729919, 844.137390, 13.733120,3.5);
   SendClientMessage(playerid, COLOR_YELLOW,"Brana zavrena");
   return 1;
   }
if (strcmp(cmdtext, "/open 985", true)==0)
   {
   MoveObject(vchod, 1015.318542, 1224.709717, 27.068413,10);
   SendClientMessage(playerid, COLOR_YELLOW,"Pristup povolen");
   return 1;
   }
   
if (strcmp(cmdtext, "/close 985", true)==0)
   {
   MoveObject(vchod, 1015.318542, 1224.709717, 17.068413,10);
   SendClientMessage(playerid, COLOR_YELLOW,"Vchod zavren");
   return 1;
   }
return 0;
}
Reply
#6

thanks i will try it


EDIT: RLY THANK YOU ALL it works now!! it is still writing bad parameter count after any command, but that doesnt matter for now.
Reply
#7

Quote:
Originally Posted by Tunner
thanks i will try it


EDIT: RLY THANK YOU ALL it works now!! it is still writing bad parameter count but that doesnt matter.
No problem mate.
Reply
#8

OH lol that bad parameter count is cuz of gamemode not cuz of any script



EDIT: everything solved now
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)