Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- //OnPlayerSpawn
- if(Death[playerid] == 1)
- {
- new
- Float: Hospital1 = GetPlayerDistanceFromPoint(playerid, 2034.1149,-1414.9154,16.9922), //133.3335
- Float: Hospital2 = GetPlayerDistanceFromPoint(playerid, 1182.1077,-1324.0918,13.5815), //270.4434
- Float: Hospital3 = GetPlayerDistanceFromPoint(playerid, 1244.3423,331.9934,19.5547), //335.6859
- Float: Hospital4 = GetPlayerDistanceFromPoint(playerid, 1607.6090,1821.0934,10.8280), //0.7354
- Float: Hospital5 = GetPlayerDistanceFromPoint(playerid, -317.0090,1056.6217,19.7422), //358.9579
- Float: Hospital6 = GetPlayerDistanceFromPoint(playerid, -1514.7358,2527.0601,55.7455), //359.0611
- Float: Hospital7 = GetPlayerDistanceFromPoint(playerid, -2661.2441,633.7098,14.4531), //180.1544
- Float: Hospital8 = GetPlayerDistanceFromPoint(playerid, -2198.7803,-2306.5793,30.6250); //320.6338
- }
- //OnPlayerSpawn
- if(Death[playerid] == 1)
- {
- new
- Float: HospitalDistance[8],
- closest = -1,
- Float: tmp_distance = -1.0;
- HospitalDistance[0] = GetPlayerDistanceFromPoint(playerid, 2034.1149,-1414.9154,16.9922);
- HospitalDistance[1] = GetPlayerDistanceFromPoint(playerid, 1182.1077,-1324.0918,13.5815);
- HospitalDistance[2] = GetPlayerDistanceFromPoint(playerid, 1244.3423,331.9934,19.5547);
- HospitalDistance[3] = GetPlayerDistanceFromPoint(playerid, 1607.6090,1821.0934,10.8280);
- HospitalDistance[4] = GetPlayerDistanceFromPoint(playerid, -317.0090,1056.6217,19.7422);
- HospitalDistance[5] = GetPlayerDistanceFromPoint(playerid, -1514.7358,2527.0601,55.7455);
- HospitalDistance[6] = GetPlayerDistanceFromPoint(playerid, -2661.2441,633.7098,14.4531);
- HospitalDistance[7] = GetPlayerDistanceFromPoint(playerid, -2198.7803,-2306.5793,30.6250);
- for (new i; i != sizeof (HospitalDistance); ++i)
- {
- if (HospitalDistance[i] > tmp_distance)
- {
- tmp_distance = HospitalDistance[i];
- closest = i;
- }
- }
- // set player's pos
- switch (closest)
- {
- case 0:
- {
- // 2034.1149,-1414.9154,16.9922
- }
- case 1:
- {
- // 1182.1077,-1324.0918,13.5815
- }
- case 2:
- {
- // 1244.3423,331.9934,19.5547
- }
- case 3:
- {
- // 1607.6090,1821.0934,10.8280
- }
- case 4:
- {
- // -317.0090,1056.6217,19.7422
- }
- case 5:
- {
- //-1514.7358,2527.0601,55.7455
- }
- case 6:
- {
- // -2661.2441,633.7098,14.4531
- }
- case 7:
- {
- // -2198.7803,-2306.5793,30.6250
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement