19.03.2016, 04:08
How would I do this... I create an array with all coordinates of points the object can go to.
Also, when u create an object u should assing it's id to some sort of variable:
And change
Into
Then, on player enter training area, rand a number to get the first coordinates to move to, course AFTER u create an object itself...
U copy and paste this one into OnPlayerWeaponShot and OnPlayerObjectMoved.
It is still a pretty rought idea of what u should do, but I should have left something for u to figure out urself, othervise u would just copy it, and didn't develop form it.
Код:
new Float:TrainingObjectMoving[7][3] = { {1441.1388,1348.8584,10.8130}, {1438.1956,1359.2809,10.8203}, ... {1437.0270,1371.0566,10.8203} };
Код:
new TrainingObject[MAX_PLAYERS];//to ur global variables
Код:
CreatePlayerObject(playerid,2056,-5.9348,1556.2980,12.75000, 0.00000, 0.00000, 90.00000);
Код:
TrainingObject[playerid] =CreatePlayerObject(playerid,2056,-5.9348,1556.2980,12.75000, 0.00000, 0.00000, 90.00000);
Код:
new rpos = rand(7); MovePlayerObect(playerid,TrainingObject[playerid],TrainingObjectMoving[rpos][0], TrainingObjectMoving[rpos][1],TrainingObjectMoving[rpos][2], 1.0/*this is the speed value, u might want to edit it!*/);
It is still a pretty rought idea of what u should do, but I should have left something for u to figure out urself, othervise u would just copy it, and didn't develop form it.
Good luck!