door 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)
+--- Thread: door help (
/showthread.php?tid=449764)
door help -
Godzilla8957 - 10.07.2013
i'm having trouble, i'm trying to make a command that can open my PD door, but every time i do the command it won't open. can you guys help me?
here are the commands
Код:
if(strcmp(cmd, "/opensddoor", true) == 0)
{
MoveObject(apsd, 496.0321, 1763.5408, 1179.0130, 3);
return 1;
}
if(strcmp(cmd, "opensddoor", true) == 0)
{
MoveObject(apsd, 496.0321, 1763.5408, 1181.4729, 3);
return 1;
}
Re: door help -
Djean - 10.07.2013
Alright, The reason for this is because you have the two commands as the same, it will not open. I also see that you forgot to put "/" on the 'closeddoor'. It should be "/closeddoor" not just "closeddoor" the Separate the CMDS. Use this below.
pawn Код:
if(strcmp(cmd, "/opensddoor", true) == 0)
{
MoveObject(apsd, 496.0321, 1763.5408, 1179.0130, 3);
return 1;
}
if(strcmp(cmd, "/closeddoor", true) == 0)
{
MoveObject(apsd, 496.0321, 1763.5408, 1181.4729, 3);
return 1;
}
I hope this helped! Good Luck