11.01.2015, 18:05
(
Последний раз редактировалось Ciarannn; 11.01.2015 в 20:26.
)
So I am making an Arms Dealer command where you do /getmats and it gives you a random place to deliver the materials.
I have a float for the co-ordinates:
And then this is in my /getmats command:
And when it gives me a random checkpoint, I also want it to send the player a message corresponding to the co-ordinates it picked.
So for example:
If the co-ordiantes randomly selected where [-1322.2762,2498.0610,87.0469], that is Aldea Malvade, so when it is randomly selected, it would set their checkpoint and then:
How would I do that?
I have a float for the co-ordinates:
Код:
new Float:DROPMATS[][3] = { {-1322.2762,2498.0610,87.0469}, //dropmats one {-2433.6064,2293.0537,4.9844}, //dropmats two {1405.9614,969.5345,10.8130}, //dropmats three {2867.3218,2569.6433,10.8203}, //dropmats four {2367.7493,2759.4209,10.8203}, //dropmats five {1882.1393,721.3551,10.8203}, //dropmats six {870.1201,-25.4718,63.9474} //dropmats seven };
Код:
new rand = random(sizeof(DROPMATS)); SetPlayerCheckpoint(playerid, DROPMATS[rand][0], DROPMATS[rand][1], DROPMATS[rand][2], 3);
So for example:
If the co-ordiantes randomly selected where [-1322.2762,2498.0610,87.0469], that is Aldea Malvade, so when it is randomly selected, it would set their checkpoint and then:
Код:
SendCleintMessage(playerid, 1, "The package reads Aldea Malvade. Deliver it to the red marker.");