I doesn't get help here!!! (need help with command explain) - 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: I doesn't get help here!!! (need help with command explain) (
/showthread.php?tid=274827)
I doesn't get help here!!! (need help with command explain) -
igor_andrusenko - 07.08.2011
I can't create a filterscript with using those Objects (AND I still doesn't receive a help), I try to cerate a one (!) gate with command and message to player who open (Gate is open!) and while close (or close automaticly) (Gate is closed!). So, I need a help, because a tutorials can't explait everything good. So, I need tutorial, or create a filterscript (I don't wanna publish).
Gate opened:
id of object: 980, X= 1534.5843505859, Y= -1451.3070068359, Z= 15.159576416016
Gate closed:
id of object: 980 (yes the same), X= 1545.5843505859, Y= -1451.3070068359, Z= 15.159576416016
All rotations are: 0.
Thanks if you helped me.
Re: I doesn't get help here!!! (need help with command explain) - HuSs3n - 07.08.2011
Try This :
on top
Код:
new door, DoorOpened;
OnGameModeInit
Код:
door = createobject(980,1534.5843505859, -1451.3070068359,15.159576416016);
DoorOpened = 0;
OnPlayerCommandText
Код:
if(strcmp("/open", cmdtext, true, 10) == 0)
{
if(DoorOpened != 0) return 0;
MoveObject(door,1534.5843505859, -1451.3070068359,10.159576416016,1.00);
SendClientMessage(playerid, 0xFF000000, "The Door Is Opened");
DoorOpened = 1;
}
if(strcmp("/close", cmdtext, true, 10) == 0)
{
if(DoorOpened == 0) return 0;
MoveObject(door,1534.5843505859, -1451.3070068359,15.159576416016,1.00);
SendClientMessage(playerid, 0xFF000000, "The Door Is Closed");
DoorOpened = 0;
}
Re: I doesn't get help here!!! (need help with command explain) -
[bs]_lancer - 07.08.2011
if u r using the doors in filterscript u need to define the FS and u have to put the objects under OnFilterScriptInit
well here 1 cmd to open and close with msgs
On Top Of Script
Under OnFilterScriptInit
pawn Код:
Door = CreatObject(980,1534.5843505859, -1451.3070068359,15.159576416016);
And Here your Command
pawn Код:
if(strcmp(cmdtext, "/door", true) == 0)
{
if(DoorStatus == 0)
{
MoveObject(Door,1534.5843505859,-1451.3070068359,15.159576416016,3.0);
SendClientMessage(playerid, COLOR_RED, "Doos Is Open");
GateStatus = 1;
return 1;
}
if(DoorStatus == 1)
{
MoveObject(Door,1545.5843505859,-1451.3070068359,15.159576416016, 3.0);
SendClientMessage(playerid, COLOR_RED, "Doos Closed");
GateStatus = 0;
}
return 1;
}