help on easy thing X=X
#1

hi guys
I want to define " new Race_Pos[20];"
and I did
new Float:SR1_Pos[8][4] = {
{2910.7000000,2399.2000000,10.4000000,180.0000000} ,
{2904.3999000,2399.1001000,10.4000000,180.0000000} ,
{2907.6001000,2393.1001000,10.4000000,180.0000000} ,
{2907.6001000,2387.2000000,10.4000000,180.0000000} ,
{2904.2000000,2387.1001000,10.4000000,180.0000000} ,
{2910.6001000,2387.3000000,10.4000000,180.0000000} ,
{2910.7002000,2393.1006000,10.4000000,180.0000000} ,
{2904.2998000,2393.0000000,10.4000000,180.0000000}
};

now how to do this properly Race_Pos=SR1_Pos; ?
Reply
#2

more information...
i don't get what is your mean !
Reply
#3

example
PHP код:
new Float:RandPlayerSpawn[4][4] = {
{-
2564.538,1092.589,55.664,337.096},
{-
2356.0573,995.4032,50.8984,182.0485},
{-
1382.105224,-230.142044,14.148437,313.913299},
{-
2396.605468,-617.606628,132.737396,36.312511}
};
new 
Float:RandPlayerSpawn2[4][4] = {
{-
2564.538,1092.589,55.664,337.096},
{-
2356.0573,995.4032,50.8984,182.0485},
{-
1382.105224,-230.142044,14.148437,313.913299},
{-
2396.605468,-617.606628,132.737396,36.312511}
};
new 
XXX
i want to do XXX=RandPlayerSpawn2;
for
PHP код:
new rand random(sizeof(XXX));
SetPlayerPosEx(playeridXXX[rand][0], XXX[rand][1], XXX[rand][2],XXX[rand][3]); 
Reply
#4

There's no need to use XXX variable.
pawn Код:
new rand = random(4);
SetPlayerPosEx(playerid, RandPlayerSpawn[rand][0], RandPlayerSpawn[rand][1], RandPlayerSpawn[rand][2],RandPlayerSpawn[rand][3]);
Reply
#5

well i do need this because if want to set XXX=RandPlayerSpawn1 or changeto XXX=RandPlayerSpawn2
is it possible to do that?
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)