SA-MP Forums Archive
i need some 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: i need some help (/showthread.php?tid=359289)



i need some help - Tuntun - 13.07.2012

Hello
i need some help... i mead a teleport cmd's but it have 1error.. i can't find it.. please help
my teleport cmd's:
Код:
#include <a_samp>
public OnPlayerCommandText(playerid, cmdtext[])
{
if(strcmp(cmdtext, "/apartment", true,7))
    {
        SetPlayerPos(playerid, -131.6455,-1635.9362,3.3750);
        SendClientMessage(playerid, 0x00FF00AA, "You have teleported to Apartmet!.");
        return 1;
      }

Gate system:
i need help with a gate system too... in my Apartment gate... please help... the Create objects of the Gate:

CreateObject(980, -138.60, -1638.56, 3.16, 0.00, 0.00, 5.0;
CreateObject(980, -124.56, -1637.61, 3.27, 0.00, 0.00, 6.0;


Re: i need some help - XStormiest - 13.07.2012

try this in error 1:
Код:
#include <a_samp>

public OnPlayerCommandText(playerid, cmdtext[])
{
if(strcmp(cmdtext, "/apartment", true,7))
    {
        SetPlayerPos(playerid, -131.6455,-1635.9362,3.3750);
         SetPlayerInterior(playerid,interiorid) // because you want to teleport into an interior ...
        SendClientMessage(playerid, 0x00FF00AA, "You have teleported to Apartmet!.");
        return 1;
      }
return 1;
}
you can see interior by using ingame commands /interior when you are in apartament
for 2 search a tutorial...


Re: i need some help - Glint - 13.07.2012

What is your problem, i didn't understand it.


Re: i need some help - Lordzy - 13.07.2012

You need an auto moveable gate or moveable gate with cmd?


Re: i need some help - XStormiest - 13.07.2012

for auto use SetTimer and MoveGate, + public and forward good luck
for cmd use public OnPlayerCommandText, and MoveGate


Re: i need some help - Tuntun - 13.07.2012

the gate i need with cmd's /og and /cg...
i don't use interior XStormiest so why need interior id


Re: i need some help - Roko_foko - 13.07.2012

if(strcmp(cmdtext, "/apartment", true,7)) not 7, atleast you need 10


Re: i need some help - XStormiest - 13.07.2012

in this case you don't need interior
if(strcmp(cmdtext, "/apartment", true) == 0)
{
/// code here
}

so first CreateGate is door close or open and 2 CreateGate?


Re: i need some help - tyler12 - 13.07.2012

Whats the error?


Re: i need some help - Tuntun - 13.07.2012

F:\test.pwn(10) : error 030: compound statement not closed at the end of file (started at line 4)
Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase


1 Error.