BAD PARAMETER COUNT (gates) -
Tunner - 09.05.2009
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.........
Re: BAD PARAMETER COUNT (gates) -
James_Alex - 09.05.2009
yeah, post the script
Re: BAD PARAMETER COUNT (gates) -
Tunner - 10.05.2009
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;
}
Re: BAD PARAMETER COUNT (gates) -
CJ101 - 10.05.2009
it should be return 0; at the end
Re: BAD PARAMETER COUNT (gates) -
Klutty - 10.05.2009
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;
}
Re: BAD PARAMETER COUNT (gates) -
Tunner - 10.05.2009
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.
Re: BAD PARAMETER COUNT (gates) -
Klutty - 10.05.2009
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.
Re: BAD PARAMETER COUNT (gates) -
Tunner - 10.05.2009
OH lol that bad parameter count is cuz of gamemode not cuz of any script
EDIT: everything solved now