Help me -
liri.x - 20.05.2012
Can u help me someone pls
fix gate command /open
CreateObject(971, 1539.5, -1627.4000244141, 15.800000190735, 0, 0, 270); //gate
Код:
#define FILTERSCRIPT
#include <a_samp>
public OnFilterScriptInit()
{
CreateObject(10829, 1541.6999511719, -1619.6999511719, 12.10000038147, 0, 0, 0);
CreateObject(10829, 1541.5999755859, -1635.6999511719, 12.300000190735, 0, 0, 0); //
CreateObject(987, 1607.8000488281, -1614.3000488281, 15.5, 0, 0, 92); //
CreateObject(987, 1551.4000244141, -1602.5999755859, 15.5, 0, 0, 180); //
CreateObject(987, 1563.3000488281, -1602.8000488281, 15.5, 0, 0, 179.99450683594); //
CreateObject(987, 1574.5999755859, -1602.6999511719, 15.5, 0, 0, 179.99450683594); //
CreateObject(987, 1586.5999755859, -1602.8000488281, 15.5, 0, 0, 179.99450683594); //
CreateObject(987, 1598.5, -1602.5999755859, 15.5, 0, 0, 179.99450683594);
CreateObject(987, 1608, -1602.5, 15.5, 0, 0, 181.99450683594);
CreateObject(987, 1539.599609375, -1602.2998046875, 15.5, 0, 0, 270);
CreateObject(987, 1607.5999755859, -1626.1999511719, 15.5, 0, 0, 89.99951171875);
CreateObject(987, 1607.8000488281, -1637.9000244141, 15.5, 0, 0, 89.994506835938);
CreateObject(987, 1595.9000244141, -1637.3000488281, 15.5, 0, 0, 357.99401855469);
CreateObject(987, 1584.4000244141, -1638.0999755859, 17.5, 0, 0, 359.98950195313);
CreateObject(987, 1574.0999755859, -1637.5, 17.5, 0, 0, 359.98950195313);
CreateObject(987, 1539.3000488281, -1614.5, 15.5, 0, 0, 272);
CreateObject(987, 1539.6999511719, -1626.1999511719, 15.699999809265, 0, 0, 271.99951171875);
CreateObject(987, 1539.9000244141, -1637.9000244141, 15.699999809265, 0, 0, 321.99951171875);
CreateObject(971, 1539.5, -1627.4000244141, 15.800000190735, 0, 0, 270); //gate
CreateObject(996, 1550.1999511719, -1617.5, 13.10000038147, 0, 0, 0);
CreateObject(996, 1558.4000244141, -1617.5, 13.10000038147, 0, 0, 0);
CreateObject(996, 1562.5999755859, -1617.5, 13.10000038147, 0, 0, 0);
CreateObject(996, 1570.8000488281, -1617.5, 13.10000038147, 0, 0, 0);
return 1;
}
Re: Help me -
[ABK]Antonio - 20.05.2012
Do you use strcmp, zcmd or what?
Guess it doesn't matter
pawn Код:
new gate[1]; //if you add more gates do like below (but change 1 to 2)
new bool:gatestatus[1] = false; //same as above...used to see it they're open or not
public OnFilterScriptInit()
{
gate[0] = CreateObject(971, 1539.5, -1627.4000244141, 15.800000190735, 0, 0, 270); //gate
//another gate would look like
//gate[1] = CreateObject(971, 1539.5, -1627.4000244141, 15.800000190735, 0, 0, 270); //gate
return 1;
}
//Inside the command
if(IsPlayerInRangeOfPoint(playerid, Float:Range, Float:X, Float:Y, Float:Z) //where you want them to be when they can open it
{
//if it's open we close it by putting it back at it's starting position
if(gatestatus[0]) MoveObject(gate[0], 1539.5, -1627.4000244141, 15.800000190735, 1, 0, 0, 270);
//if it's not open we open it
//We change the Z position of the object +10. (moves the gate up)
else MoveObject(gate[0], 1539.5, -1627.4000244141, 20.800000190735, 1, 0, 0, 270);
}
return 1;
/*
//Syntax for MoveObject
//MoveObject(objectid, Float:X, Float:Y, Float:Z, Float:Speed, Float:RotX = -1000.0, Float:RotY = -1000.0, Float:RotZ = -1000.0)
*/
I only removed the other objects so you could see what was going on better
Re: Help me -
liri.x - 20.05.2012
Код:
C:\DOCUME~1\SINKOP~1\Desktop\gangbase.pwn(12) : error 032: array index out of bounds (variable "gate")
C:\DOCUME~1\SINKOP~1\Desktop\gangbase.pwn(21) : error 010: invalid function or declaration
C:\DOCUME~1\SINKOP~1\Desktop\gangbase.pwn(24) : error 010: invalid function or declaration
C:\DOCUME~1\SINKOP~1\Desktop\gangbase.pwn(27) : error 010: invalid function or declaration
C:\DOCUME~1\SINKOP~1\Desktop\gangbase.pwn(29) : error 010: invalid function or declaration
C:\DOCUME~1\SINKOP~1\Desktop\gangbase.pwn(30) : warning 203: symbol is never used: "gatestatus"
Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase
5 Errors.
Re: Help me -
liri.x - 20.05.2012
Location is LSPD
Re: Help me -
liri.x - 20.05.2012
has someone to help me
Re: Help me -
Faisal_khan - 20.05.2012
Paste your code.
Re: Help me -
liri.x - 20.05.2012
Код:
#define FILTERSCRIPT
#include <a_samp>
public OnFilterScriptInit()
{
CreateObject(10829, 1541.6999511719, -1619.6999511719, 12.10000038147, 0, 0, 0);
CreateObject(10829, 1541.5999755859, -1635.6999511719, 12.300000190735, 0, 0, 0); //
CreateObject(987, 1607.8000488281, -1614.3000488281, 15.5, 0, 0, 92); //
CreateObject(987, 1551.4000244141, -1602.5999755859, 15.5, 0, 0, 180); //
CreateObject(987, 1563.3000488281, -1602.8000488281, 15.5, 0, 0, 179.99450683594); //
CreateObject(987, 1574.5999755859, -1602.6999511719, 15.5, 0, 0, 179.99450683594); //
CreateObject(987, 1586.5999755859, -1602.8000488281, 15.5, 0, 0, 179.99450683594); //
CreateObject(987, 1598.5, -1602.5999755859, 15.5, 0, 0, 179.99450683594);
CreateObject(987, 1608, -1602.5, 15.5, 0, 0, 181.99450683594);
CreateObject(987, 1539.599609375, -1602.2998046875, 15.5, 0, 0, 270);
CreateObject(987, 1607.5999755859, -1626.1999511719, 15.5, 0, 0, 89.99951171875);
CreateObject(987, 1607.8000488281, -1637.9000244141, 15.5, 0, 0, 89.994506835938);
CreateObject(987, 1595.9000244141, -1637.3000488281, 15.5, 0, 0, 357.99401855469);
CreateObject(987, 1584.4000244141, -1638.0999755859, 17.5, 0, 0, 359.98950195313);
CreateObject(987, 1574.0999755859, -1637.5, 17.5, 0, 0, 359.98950195313);
CreateObject(987, 1539.3000488281, -1614.5, 15.5, 0, 0, 272);
CreateObject(987, 1539.6999511719, -1626.1999511719, 15.699999809265, 0, 0, 271.99951171875);
CreateObject(987, 1539.9000244141, -1637.9000244141, 15.699999809265, 0, 0, 321.99951171875);
CreateObject(971, 1539.5, -1627.4000244141, 15.800000190735, 0, 0, 270); //gate
CreateObject(996, 1550.1999511719, -1617.5, 13.10000038147, 0, 0, 0);
CreateObject(996, 1558.4000244141, -1617.5, 13.10000038147, 0, 0, 0);
CreateObject(996, 1562.5999755859, -1617.5, 13.10000038147, 0, 0, 0);
CreateObject(996, 1570.8000488281, -1617.5, 13.10000038147, 0, 0, 0);
return 1;
}
Re: Help me -
Faisal_khan - 20.05.2012
(FACEPALM) Paste the whole code.
Re: Help me -
liri.x - 20.05.2012
download
http://www.sendspace.com/file/tuyjw3
Re: Help me -
Faisal_khan - 20.05.2012
Man can't you paste it here or in pastebin? My AV blocked the download saying it has virus.