Gate Help please! - 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)
+---- Forum: Help Archive (
https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: Gate Help please! (
/showthread.php?tid=155966)
Gate Help please! -
Karl115 - 20.06.2010
Can some one help me do a gang gate for Faction id
5 these are the object co.ordinates : please help me:
Closed:CreateObject(987, 1820.9423828125, -2007.2276611328, 12.554395675659, 0.000000, 0.000000, 0.000000); //
Open: CreateObject(987, 1820.8729248047, -2007.3715820313, 16.642910003662, 0.000000, 0.000000, 0.000000); //
Re: Gate Help please! -
Conroy - 20.06.2010
pawn Код:
forward Faction5GateCheck();
new Faction5Gate;
new Faction5GateStatus;
pawn Код:
//OnGameModeInit
Faction5Gate = CreateObject(987, 1820.9423828125, -2007.2276611328, 12.554395675659, 0.000000, 0.000000, 0.000000);
SetTimer("Faction5GateCheck", 1000, true);
pawn Код:
public Faction5GateCheck()
{
for(new i; i<MAX_PLAYERS; i++) {
if(IsPlayerConnected(i)) {
//if(GetPlayerTeam(i) == 5) { /*Uncomment this line if you want to use this gate for team 5 only*/
if(IsPlayerInRangeOfPoint(i, 10.0, 1820.9423828125, -2007.2276611328, 12.554395675659)) {
Faction5GateStatus = 1;
} else if(!IsPlayerInRangeOfPoint(i, 10.0, 1820.9423828125, -2007.2276611328, 12.554395675659)) {
Faction5GateStatus = 0;
}
//} /*Uncomment this line if you want to use this gate for team 5 only*/
}
}
if(Faction5GateStatus == 0) MoveObject(Faction5Gate, 1820.9423828125, -2007.2276611328, 12.554395675659, 5.0);
if(Faction5GateStatus == 1) MoveObject(Faction5Gate, 1820.8729248047, -2007.3715820313, 16.642910003662, 5.0);
return 1;
}
Re: Gate Help please! -
Karl115 - 21.06.2010
Код:
public Faction5GateCheck()
{
for(new i; i<MAX_PLAYERS; i++) {
if(IsPlayerConnected(i)) {
//if(GetPlayerTeam(i) == 5) { /*Uncomment this line if you want to use this gate for team 5 only*/
if(IsPlayerInRangeOfPoint(i, 10.0, 1820.9423828125, -2007.2276611328, 12.554395675659)) {
Faction5GateStatus = 1;
} else if(!IsPlayerInRangeOfPoint(i, 10.0, 1820.9423828125, -2007.2276611328, 12.554395675659)) {
Faction5GateStatus = 0;
}
//} /*Uncomment this line if you want to use this gate for team 5 only*/
}
Where should i put that [[srry i am a new scripter]]
}
if(Faction5GateStatus == 0) MoveObject(Faction5Gate, 1820.9423828125, -2007.2276611328, 12.554395675659, 5.0);
if(Faction5GateStatus == 1) MoveObject(Faction5Gate, 1820.8729248047, -2007.3715820313, 16.642910003662, 5.0);
return 1;
}
Where should i put this!! help
Okay compiled but what is the command dude?