SA-MP Forums Archive
Help gate[Rep] - 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: Help gate[Rep] (/showthread.php?tid=313313)



Help gate[Rep] - Dan_Barocu - 25.01.2012

i made a fs by me...but it doesent work... you can try it.. please help me fix it ....anyway how can i find coord when the gate goes down..please help.me ..im romanian .


Код:
#include <a_samp>


#define COLOR_YELLOW 0xFFFF00AA
#define COLOR_BLUE 0x2641FEAA
#define FILTERSCRIPT
forward GateClose1();
forward GateClose2();

new mafiachineza1;
new mafiachineza2;
public OnFilterScriptInit()
{
    CreateObject(7033, 57.066192626953, -1532.0367431641, 8.7498607635498, 0, 0, 80);
	mafiachineza1 = CreateObject(980,664.89862061,-1309.79003906,15.23432922,0.00000000,0.00000000,180.00000000);
	mafiachineza2 = CreateObject(980,785.95721436,-1152.47314453,25.37189293,0.00000000,0.00000000,270.00000000);
                    
	
	print("\n--------------------------------------");
	print("             Vama by Dan Barocu         ");
	print("--------------------------------------\n");
	return 1;
}

public OnFilterScriptExit()
{
	return 1;
}

public OnPlayerCommandText(playerid, cmdtext[])
{
    if (strcmp(cmdtext, "/vama1", true)==0)
    {
        MoveObject(mafiachineza1,58,665.0745, -1309.4437, 13.4609, 5.5);
		SetTimer("GateClose1", 2000, 0);
        return 1;
    }
    if (strcmp(cmdtext, "/vama2", true)==0)
    {
        MoveObject(mafiachineza2,58.821594238281, -1526.1868896484, 1.1389622688293, 5.5);
        SetTimer("GateClose2", 2000, 0);
        return 1;
    }
	return 0;
}

public GateClose1()
{
    MoveObject (mafiachineza1,59,665.19006348, -1243.28930664, 8.72245789, 2.5);
    return 1;
}
public GateClose2()
{
    MoveObject (mafiachineza2,59,783.24310303, -1152.51770020, 19.47818375, 2.5);
    return 1;                 
}



AW: Help gate[Rep] - Drebin - 25.01.2012

Be sure to use the correct parameters for MoveObject :
pawn Код:
MoveObject(objectid, Float:X, Float:Y, Float:Z, Float:Speed);
//            1         2        3        4           5
But you have:
pawn Код:
MoveObject (mafiachineza1,59,665.19006348, -1243.28930664, 8.72245789, 2.5);
//                1       2        3               4            5       6
Try this:
pawn Код:
#include <a_samp>


#define COLOR_YELLOW 0xFFFF00AA
#define COLOR_BLUE 0x2641FEAA
#define FILTERSCRIPT
forward GateClose1();
forward GateClose2();

new mafiachineza1;
new mafiachineza2;
public OnFilterScriptInit()
{
    CreateObject(7033, 57.066192626953, -1532.0367431641, 8.7498607635498, 0, 0, 80);
    mafiachineza1 = CreateObject(980,664.89862061,-1309.79003906,15.23432922,0.00000000,0.00000000,180.00000000);
    mafiachineza2 = CreateObject(980,785.95721436,-1152.47314453,25.37189293,0.00000000,0.00000000,270.00000000);


    print("\n--------------------------------------");
    print("             Vama by Dan Barocu         ");
    print("--------------------------------------\n");
    return 1;
}

public OnFilterScriptExit()
{
    return 1;
}

public OnPlayerCommandText(playerid, cmdtext[])
{
    if (strcmp(cmdtext, "/vama1", true)==0)
    {
        MoveObject(mafiachineza1,58.6650745, -1309.4437, 13.4609, 5.5);
        SetTimer("GateClose1", 2000, 0);
        return 1;
    }
    if (strcmp(cmdtext, "/vama2", true)==0)
    {
        MoveObject(mafiachineza2,58.821594238281, -1526.1868896484, 1.1389622688293, 5.5);
        SetTimer("GateClose2", 2000, 0);
        return 1;
    }
    return 0;
}

public GateClose1()
{
    MoveObject (mafiachineza1,59.66519006348, -1243.28930664, 8.72245789, 2.5);
    return 1;
}
public GateClose2()
{
    MoveObject (mafiachineza2,59.78324310303, -1152.51770020, 19.47818375, 2.5);
    return 1;
}



Re: Help gate[Rep] - Dan_Barocu - 25.01.2012

did you try it??you changed try it please i moves weird..

Код:
#include <a_samp>


#define COLOR_YELLOW 0xFFFF00AA
#define COLOR_BLUE 0x2641FEAA
#define FILTERSCRIPT
forward GateClose1();
forward GateClose2();

new mafiachineza1;
new mafiachineza2;
public OnFilterScriptInit()
{
    CreateObject(7033, 57.066192626953, -1532.0367431641, 8.7498607635498, 0, 0, 80);
	mafiachineza1 = CreateObject(980,664.89862061,-1309.79003906,15.23432922,0.00000000,0.00000000,180.00000000);
	mafiachineza2 = CreateObject(980,785.95721436,-1152.47314453,25.37189293,0.00000000,0.00000000,270.00000000);


	print("\n--------------------------------------");
	print("             Vama by Dan Barocu         ");
	print("--------------------------------------\n");
	return 1;
}

public OnFilterScriptExit()
{
	return 1;
}

public OnPlayerCommandText(playerid, cmdtext[])
{
    if (strcmp(cmdtext, "/vama1", true)==0)
    {
        MoveObject(mafiachineza1,58.6650745, -1309.4437, 13.4609, 5.5);
		SetTimer("GateClose1", 2000, 0);
        return 1;
    }
    if (strcmp(cmdtext, "/vama2", true)==0)
    {
        MoveObject(mafiachineza2,58.821594238281, -1526.1868896484, 1.1389622688293, 5.5);
        SetTimer("GateClose2", 2000, 0);
        return 1;
    }
	return 0;
}

public GateClose1()
{
    MoveObject (mafiachineza1,59.66519006348, -1243.28930664, 8.72245789, 2.5);
    return 1;
}
public GateClose2()
{
    MoveObject (mafiachineza2,59.78324310303, -1152.51770020, 19.47818375, 2.5);
    return 1;
}



Re: Help gate[Rep] - milanosie - 25.01.2012

Update ur streamer plugin

"SEARCH" button and typ Streamer


Re: Help gate[Rep] - Dan_Barocu - 25.01.2012

i did....


Re: Help gate[Rep] - Dan_Barocu - 25.01.2012

please help


Re: Help gate[Rep] - Konstantinos - 25.01.2012

How do you expect to work while you create an object from here
pawn Код:
X: 664.89862061, Y: -1309.79003906, Z: 15.23432922
To
pawn Код:
X: 58.6650745, Y: -1309.4437, Z: 13.4609
with speed 5. Too long distance!


Re: Help gate[Rep] - Dan_Barocu - 25.01.2012

still no work...


AW: Help gate[Rep] - Drebin - 25.01.2012

I don't think you've the correct coordinates (because you move the objects over a distance of 200m).
And when you enter the new coordinates, stick to the parameters..


Re: Help gate[Rep] - milanosie - 25.01.2012

also Dan, Can I ask you to contact someone who can speak english before posting? Not to be rude but its just way easyer to understand your problem when your english is better.