duel system location - 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: duel system location (
/showthread.php?tid=649096)
duel system location -
PundacheMakalae - 02.02.2018
Im trying to make a duel system, to have multiple duel locations, i have to store dueler1 and dueler2 Pos coords somehow. What kind of variable should i use to store SetPlayerPos coords?
for example
pawn Код:
SetPlayerPos(dueler1, Duelplacecoords1); //Dueler 1, standing pos
SetPlayerPos(dueler2, Duelplacecoords2); //Dueler 2 standing pos [face to face]
NOTE: i cant define it as im trying to make multiple locations
Re: duel system location -
solstice_ - 02.02.2018
PHP код:
new Float:DuelSpawns[][4] =
{
{dueler1},
{dueler2},
{dueler3} // Add the "," if you want to add more.
};
Re: duel system location -
Hrb - 02.02.2018
Код:
new Float:Dueler_Pos[][] = {
{12.0, 12.0, 12.0}, // Line ID 0 - Pos X , Pos Y, Pos Z
{11.0, 11.0, 11.0}, // Line ID 1 - Pos X , Pos Y, Pos Z
{10.0, 10.0, 10.0} // Line ID 2 - Pos X , Pos Y, Pos Z
}; // example of 3 positions
new r = random(sizeof(Dueler_Pos)); // random line from Dueler_Pos, from 0 to sizeof(Dueler_Pos) (3)
SetPlayerPos(dueler1, Dueler_Pos[r][0], Dueler_Pos[r][1], Dueler_Pos[r][2]); //[0], [1], [2] position of variable on "r" line
EDIT: willbedie was faster
Re: duel system location -
Mugala - 02.02.2018
u can add at these scripts one more variable (rotation) and u can set it with SetPlayerFacingAngle