duel system location
#1

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
Reply
#2

PHP код:
new Float:DuelSpawns[][4] =
{
        {
dueler1},
        {
dueler2},
        {
dueler3// Add the "," if you want to add more.
}; 
Reply
#3

Код:
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
Reply
#4

u can add at these scripts one more variable (rotation) and u can set it with SetPlayerFacingAngle
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)