SA-MP Forums Archive
help on easy thing X=X - 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: help on easy thing X=X (/showthread.php?tid=545126)



help on easy thing X=X - Last_Shadow - 06.11.2014

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; ?


Re: help on easy thing X=X - M0HAMMAD - 06.11.2014

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


Re: help on easy thing X=X - Last_Shadow - 07.11.2014

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]); 



Re: help on easy thing X=X - dominik523 - 07.11.2014

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]);



Re: help on easy thing X=X - Last_Shadow - 07.11.2014

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