Gate open / Close HELP! - 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: Gate open / Close HELP! (
/showthread.php?tid=126554)
Gate open / Close HELP! -
Karl115 - 09.02.2010
Don't tell me to go to Wiki or ****** because i went i worked with wiki steps and i hae 3 errors!
i Got these to gate objects:
CreateObject(987, 3180.2431640625, -1987.5537109375, 12.356931686401, 0.000000, 0.000000, 269); // [closed]
CreateObject(987, 3180.1784667969, -1998.6683349609, 12.26300239563, 0.000000, 0.000000, 269); // [open]
this is the link :
https://sampwiki.blast.hk/wiki/MoveObject
can some one help me because i still get errors?
Re: Gate open / Close HELP! -
Ma - 09.02.2010
Place below "
#include <a_samp>"
Place in "
public OnGameModeInit()"
Код:
CreateObject(987, 3180.2431640625, -1987.5537109375, 12.356931686401, 0.000000, 0.000000, 269); // [closed]
Place in "
public OnPlayerCommandText(playerid, cmdtext[])"
Код:
if (strcmp("/gate", cmdtext, true, 10) == 0)
{
if (gate == 0)
{
MoveObject(Gate1, 3180.2431640625, -1987.5537109375, 12.356931686401, 4.5000);
gate=1;
}else{
MoveObject(Gate1, 3180.1784667969, -1998.6683349609, 12.26300239563, 4.5000);
gate=0;
return 1;
}
}
That will get the job done.
Re: Gate open / Close HELP! -
Karl115 - 09.02.2010
Quote:
Originally Posted by Ma
Place below " #include <a_samp>"
Place in " public OnGameModeInit()"
Код:
CreateObject(987, 3180.2431640625, -1987.5537109375, 12.356931686401, 0.000000, 0.000000, 269); // [closed]
Place in " public OnPlayerCommandText(playerid, cmdtext[])"
Код:
if (strcmp("/gate", cmdtext, true, 10) == 0)
{
if (gate == 0)
{
MoveObject(Gate1, 3180.2431640625, -1987.5537109375, 12.356931686401, 4.5000);
gate=1;
}else{
MoveObject(Gate1, 3180.1784667969, -1998.6683349609, 12.26300239563, 4.5000);
gate=0;
return 1;
}
}
That will get the job done.
|
Thanks ill try this out
Re: Gate open / Close HELP! -
windartist - 05.08.2011
LoL Wrong COde
Re: Gate open / Close HELP! -
[MG]Dimi - 05.08.2011
Quote:
Originally Posted by Ma
Place below " #include <a_samp>"
Place in " public OnGameModeInit()"
Код:
Gate1 = CreateObject(987, 3180.2431640625, -1987.5537109375, 12.356931686401, 0.000000, 0.000000, 269); // [closed]
Place in " public OnPlayerCommandText(playerid, cmdtext[])"
Код:
if (strcmp("/gate", cmdtext, true, 10) == 0)
{
if (gate == 0)
{
MoveObject(Gate1, 3180.2431640625, -1987.5537109375, 12.356931686401, 4.5000);
gate=1;
}else{
MoveObject(Gate1, 3180.1784667969, -1998.6683349609, 12.26300239563, 4.5000);
gate=0;
return 1;
}
}
That will get the job done.
|
you forgot to assign variable