How to create movable gate - 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: How to create movable gate (
/showthread.php?tid=328802)
How to create movable gate Rep +1 -
MichaelProPlayer - 26.03.2012
Hello, I want to know how to make movable gate.
Example (A player using 0xFFFFFF00 (Invisible color) and if he comes near the gate, then the gate will open automatically.If another player using different color then the gate will not open.)
Can someone know a script like this please.
Re: How to create movable gate -
MichaelProPlayer - 26.03.2012
Can anybody help Please
Re: How to create movable gate -
Twisted_Insane - 26.03.2012
Quote:
Originally Posted by MichaelProPlayer
Whooo you both can fight by sending pm each other.Don't fight here..... >.<
|
Whooo, can you stop bumping after 2 hours? The limit is 48 hours, and also, there are tons of tutorials for this!
http://forum.sa-mp.com/search.php?searchid=4292669
Re: How to create movable gate -
MichaelProPlayer - 26.03.2012
Quote:
Originally Posted by Twisted_Insane
|
LOL anyway tnx for helping i gave you +1 rep.... 1 more thing don't be so rude D:
Re: How to create movable gate -
Twisted_Insane - 26.03.2012
I usually am not rude, so don't worry! I just was still a little angry from that topic, so if you thought that I meant it in the 'evil' way, I'm sorry!
Re: How to create movable gate -
MichaelProPlayer - 26.03.2012
lol looking at your pic and your name and the way you talk.....everyone will think you are a rude person....
Re : How to create movable gate -
Ultrascipter - 26.03.2012
Can you help this code:
Код:
forward CheckForWalking();
public OnGameModeInit();
{
SetTimer("CheckForWalking", 1500, 1);
}
public CheckForWalking()
{
for(new i = 0; i < MAX_PLAYERS; i++)
{
if(IsPlayerConnected(i))
{
if(PlayerToPoint(5.0, i, X ,Y, Z))
{
if(GetPlayerColor(i) == 0xFFFFFF00)
{
Script for move gate.
}
else return 1;
}
}
}
return 1;
}
static PlayerToPoint(Float:radi, playerid, Float:x, Float:y, Float:z)
{
if(IsPlayerConnected(playerid))
{
new Float:pos[3];
new Float:tmppos[3];
GetPlayerPos(playerid, pos[0], pos[1], pos[2]);
tmppos[0] = (pos[0] - x);
tmppos[1] = (pos[1] - y);
tmppos[2] = (pos[2] - z);
if (((tmppos[0] < radi) && (tmppos[0] > -radi)) && ((tmppos[1] < radi) && (tmppos[1] > -radi)) && ((tmppos[2] < radi) && (tmppos[2] > -radi)))
{
return 1;
}
}
return 0;
}