05.02.2017, 01:57
stock do GetPlayerDistance,
Vai lб no seu OnPlayerSpawn e coloca isso aqui fion,
Veja fion.
Код:
stock GetPlayerDistanceToPoint( playerid, Float:x, Float:y ) { new Float:tmpdis; new Float:x1, Float:y1, Float:z1; GetPlayerPos( playerid, x1, y1, z1 ); tmpdis = floatsqroot( floatpower( floatabs( floatsub( x,x1 )),2 )+floatpower( floatabs( floatsub( y,y1 )),2 )); return floatround( tmpdis ); }
Код:
if( pInfo[ playerid ][ Hosp ] == 0 ) { SetPlayerPos( playerid, 1173.1145,-1323.7125,15.3962 ); SetPlayerFacingAngle( playerid, 268.1490 ); SetCameraBehindPlayer( playerid ); pInfo[ playerid ][ Hosp ] = -1; } else if( pInfo[ playerid ][ Hosp ] == 1 ) { SetPlayerPos( playerid, 2036.5521,-1412.5513,16.9922 ); SetPlayerFacingAngle( playerid, 135.5749 ); SetCameraBehindPlayer( playerid ); pInfo[ playerid ][ Hosp ] = -1; } else if( pInfo[ playerid ][ Hosp ] == 2 ) { SetPlayerPos( playerid, 1607.4396,1819.1462,10.8280 ); SetPlayerFacingAngle( playerid, 359.6572 ); SetCameraBehindPlayer( playerid ); pInfo[ playerid ][ Hosp ] = -1; } else if( pInfo[ playerid ][ Hosp ] == 3 ) { SetPlayerPos( playerid, -2665.0503,636.5155,14.4531 ); SetPlayerFacingAngle( playerid, 177.0288 ); SetCameraBehindPlayer( playerid ); pInfo[ playerid ][ Hosp ] = -1; } else if( pInfo[ playerid ][ Hosp ] == 4 ) { SetPlayerPos( playerid, -315.0838,1050.7095,20.3403 ); SetPlayerFacingAngle( playerid, 359.3905 ); SetCameraBehindPlayer( playerid ); pInfo[ playerid ][ Hosp ] = -1; } else if( pInfo[ playerid ][ Hosp ] == 5 ) { SetPlayerPos( playerid, -1514.6455,2523.4263,55.8138 ); SetPlayerFacingAngle( playerid, 359.6804 ); SetCameraBehindPlayer( playerid ); pInfo[ playerid ][ Hosp ] = -1; } else if( pInfo[ playerid ][ Hosp ] == 6 ) { SetPlayerPos( playerid, -2208.2485,-2286.8516,30.6250 ); SetPlayerFacingAngle( playerid, 319.4752 ); SetCameraBehindPlayer( playerid ); pInfo[ playerid ][ Hosp ] = -1; }