2 gates open 1 command FIXED THANKS - Printable Version
+- SA-MP Forums Archive (
https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (
https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (
https://sampforum.blast.hk/forumdisplay.php?fid=12)
+---- Forum: Help Archive (
https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: 2 gates open 1 command FIXED THANKS (
/showthread.php?tid=80224)
2 gates open 1 command FIXED THANKS -
Derksen123 - 03.06.2009
how can i make 2 gates open with 1e command??
i have it like this
Код:
new SAFMARS2;
new SAFMARS;
SAFMARS2 = CreateObject(980, 938.895569, 1810.972900, 17.596329, 0.0000, 0.0000, 270.0000);//
SAFMARS = CreateObject(980, 938.895386, 1822.428711, 17.596329, 0.0000, 0.0000, 90.0000);//
//--------------------------------------[GATE]------------------------------------------------------
if (strcmp(cmdtext, "/SAFMARSCLOSE", true)==0)
{
MoveObject (SAFMARS,938.895,1822.428,17.596,2.5);
return 1;
}
if (strcmp(cmdtext, "/SAFMARSOPEN", true)==0)
{
MoveObject (SAFMARS,938.895,1822.428,11.596,2.5);
return 1;
}
//--------------------------------------[GATE]------------------------------------------------------
if (strcmp(cmdtext, "/SAFMARSCLOSE", true)==0)
{
MoveObject (SAFMARS2,938.895569,1810.972900,17.596329,2.5);
return 1;
}
if (strcmp(cmdtext, "/SAFMARSOPEN", true)==0)
{
MoveObject (SAFMARS2,938.895569,1810.972900,11.596329,2.5);
return 1;
}
BUT only 1e gate goes open
Re: 2 gates open 1 command -
Abernethy - 03.06.2009
Add both
codes to one command. It will work than.
Re: 2 gates open 1 command -
Derksen123 - 03.06.2009
what you mean ??
where do i need to add
Re: 2 gates open 1 command -
MenaceX^ - 03.06.2009
pawn Код:
if(!strcmp(cmdtext,"/SAFMARSCLOSE",true))
{
MoveObject (SAFMARS2,938.895569,1810.972900,17.596329,2.5);
MoveObject (SAFMARS2,938.895569,1810.972900,11.596329,2.5);
return 1;
}
Re: 2 gates open 1 command -
Derksen123 - 03.06.2009
thank you man
Re: 2 gates open 1 command -
Derksen123 - 03.06.2009
Fixed