Some more help
#1

I found a script & i don't know how to make my gates, their were several codes in it, if you can explain me for it, I'd be very thankful
First Code
Код:
TestGate = CreateDynamicObject(980, -333.2999900, 1810.2000000, 43.8000000, 0.0000000, 0.0000000, 354.0000000);
The Second code for open
Код:
CMD:testgateo(playerid, params[]) {
	#pragma unused params
	if(strcmp(pName(playerid), "TestName", true) == 0) {
	    MoveDynamicObject(Jefford, -333.2999900, 1810.2000000, 38.2000000, 5);
	    SendClientMessage(playerid, Biru, "| - Your gate now is opened! - |");
	} else return SendClientMessage(playerid, red, "ERROR: Only the owner of this house (TestName) can open this gate!");
	return 1;
}
The code for close
Код:
CMD:testgatec(playerid, params[]) {
	#pragma unused params
	if(strcmp(pName(playerid), "TestName", true) == 0) {
	    MoveDynamicObject(Jefford, -333.2999900, 1810.2000000, 43.8000000, 5);
	    SendClientMessage(playerid, Biru, "| - Your gate now is closed! - |");
	} else return SendClientMessage(playerid, red, "ERROR: Only the owner of this house (TestName) can close this gate!");
	return 1;
}
Please explain me each & everything so I could use it in future
Reply
#2

How about you start by telling us which script you've "found"?
Reply
#3

hello , what do you need mate?
Reply
#4

Quote:
Originally Posted by MarkNelson
Посмотреть сообщение
Hello, What do you need? Auto Gate Close or Close my commands plus for what you need those gates i can help you
I wanted to know how to make gate open or close cmd like that.
Reply
#5

alright mate, Okay i'll explain everything for you, Okay let's Start :
Here :
Код:
TestGate = CreateDynamicObject(980, -333.2999900, 1810.2000000, 43.8000000, 0.0000000, 0.0000000, 354.0000000);
Is the Gates Object and Position. But the "TestGate" is not defined or You didn't defined it.
So this will give you errors.

TestGate Must be defined like this on the top of your script
Код:
new TestGate;
Okay and here
Код:
CMD:testgateo(playerid, params[]) {
	#pragma unused params
	if(strcmp(pName(playerid), "TestName", true) == 0) {
	    MoveDynamicObject(Jefford, -333.2999900, 1810.2000000, 38.2000000, 5);
	    SendClientMessage(playerid, Biru, "| - Your gate now is opened! - |");
	} else return SendClientMessage(playerid, red, "ERROR: Only the owner of this house (TestName) can open this gate!");
	return 1;
}
is the Command which included with zcmd and where you can see the opening gate command script.
Код:
MoveDynamicObject(Jefford, -333.2999900, 1810.2000000, 38.2000000, 5);
	    SendClientMessage(playerid, Biru, "| - Your gate now is opened! - |");
Those informations in the cmd shows what the command must do when you type the opening gate cmd.
but if you wanna make your own gate you must SAVE the gate position with /save IG and the Opening Position.
and the same position of the gate's place to close it.
So you must change positions in MoveDynamicObject Line and CreateDynamicObject Line and you must define the TestGate.
and here
Код:
CMD:testgatec(playerid, params[]) {
	#pragma unused params
	if(strcmp(pName(playerid), "TestName", true) == 0) {
	    MoveDynamicObject(Jefford, -333.2999900, 1810.2000000, 43.8000000, 5);
	    SendClientMessage(playerid, Biru, "| - Your gate now is closed! - |");
	} else return SendClientMessage(playerid, red, "ERROR: Only the owner of this house (TestName) can close this gate!");
	return 1;
}
The Command which shows how we must close the gate. But Focus on the MoveDynamicObject line in the closing command and the OnGameModeInit where you added CreateDynamicObject, it's the same position to close the gate.
So Don't forget to save your own positions and to define TestGate and check Gta User Files > SAMP > SavedPositions
Reply
#6

Quote:
Originally Posted by Sithis
Посмотреть сообщение
How about you start by telling us which script you've "found"?
I bought it for some dollars so I wish that you could help me with it.
Reply
#7

i explained for you mate.
Reply
#8

Okay, I wanted a simple to simple script so that It would be easy to make movable gates, Easy script opening with cmds
Reply
#9

Quote:
Originally Posted by RayanIbrahim
Посмотреть сообщение
Okay, I wanted a simple to simple script so that It would be easy to make movable gates, Easy script opening with cmds
Do it yourself.
Reply
#10

Quote:
Originally Posted by RayanIbrahim
Посмотреть сообщение
I bought it for some dollars so I wish that you could help me with it.
Money wasted, tbh. Hardcoded names are only found in noob scripts.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)