06.08.2018, 15:11
This is CODE:
Код:
new pactor[MAX_PLAYERS]; new cpoint[MAX_PLAYERS]; new Float:PosActor[4][4] = { {1464.30004883, -725.00000000, 92.50000000, 290.00000000}, {634.90002441, -1111.09997559, 46.50000000, 219.99511719}, {-2697.69995117, -130.50000000, 4.09999990, 270.00000000}, {-2648.60009766, 166.60000610, 4.09999990, 0.00000000} } CMD:setactor(playerid, params[]) { if(IsValidActor(pactor[playerid])) DestroyActor(pactor[playerid]); new rand = random(3); pactor[playerid] = CreateActor(1, PosActor[rand][0], PosActor[rand][1], PosActor[rand][2], PosActor[rand][3]); cpoint[playerid] = 1; SetPlayerCheckpoint(playerid, PosActor[rand][0], PosActor[rand][1], PosActor[rand][2], 3.0); return 1; } public OnPlayerEnterCheckpoint(playerid) { if(cpoint[playerid] != 0) { if(IsValidActor(pactor[playerid])) DestroyActor(pactor[playerid]); new rand = random(3); pactor[playerid] = CreateActor(1, PosActor[rand][0], PosActor[rand][1], PosActor[rand][2], PosActor[rand][3]); cpoint[playerid] = 1; SetPlayerCheckpoint(playerid, PosActor[rand][0], PosActor[rand][1], PosActor[rand][2], 3.0); } return 1; }