CreateButton - 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)
+--- Thread: CreateButton (
/showthread.php?tid=560386)
CreateButton -
Antoniohl - 28.01.2015
i'm confused, i've used wikipedia for that but still doesn't work..
look i have made everything but when you press on the button it doesn't want to move the door..
Код:
prison1 = CreateButton(1226.3521,-1326.9360,796.7456, 0); //object(kmb_keypad) (2)
Код:
prison1 = CreateDynamicObject(1495,1226.66210938,-1326.52929688,795.75000000,0.00000000,0.00000000,0.00000000); //DOOR
Код:
if(buttonid == prison1)
{
if(!Team_LSP(playerid)) return SendInfoMessage(playerid, 0, "6", "Test");
MoveDynamicObject(prison1,1226.6621, -1326.0000, 795.7500,6);
SetTimer("ClosePrison", 5000, 0);
}
Код:
Funcion ClosePrison()
{
MoveDynamicObject(prison1,1226.66210938,-1326.52929688,795.75000000,4);
return 1;
}
Re: CreateButton -
S4MSUNG - 28.01.2015
Did you tried MoveObject ?
Re: CreateButton -
Patrik356b - 28.01.2015
Quote:
Originally Posted by S4MSUNG
Did you tried MoveObject ?
|
MoveObject will only move objects created by CreateObject
OP: You store the object ids of both in the same variable?.
That is most likely the problem.
Re: CreateButton -
Antoniohl - 28.01.2015
damn hell, you right man
Re: CreateButton -
Antoniohl - 28.01.2015
lol, i have tried, the button is moving not door
, i fixed it anyway thanks.