Help hospital
#1

Hello, I want to take me to different hospitals but take them to one why so?

https://pastebin.com/R5yZv6DU
Reply
#2

bump
Reply
#3

Use This:
PHP код:
new walkHP[MAX_PLAYERS][2];
public 
OnPlayerUpdate(playerid)
{
    if(
walkHP[playerid][0] != 1)
    {
        if(
IsPlayerInRangeOfPoint(playerid100, -2657.7336,630.0181,14.4531)) //SF hospital
        
{
            
walkHP[playerid][0] = 1;
            
walkHP[playerid][1] = 0;
        }
    }else if(!
IsPlayerInRangeOfPoint(playerid100, -2657.7336,630.0181,14.4531)) //SF hospital
    
{
        
walkHP[playerid][0] = 0;
    }
    if(
walkHP[playerid][0] != 1)
    {
        if(
IsPlayerInRangeOfPoint(playerid50, -316.8019,1055.4281,19.7422)) //FC hospital
        
{
             
walkHP[playerid][1] = 1;
             
walkHP[playerid][0] = 0;
        }
    }else if(!
IsPlayerInRangeOfPoint(playerid50, -316.8019,1055.4281,19.7422)) //FC hospital
    
{
        
walkHP[playerid][1] = 0;
    }
    return 
1;
}
public 
OnPlayerDeath(playeridkilleridreason)
{
    return 
1;
}
public 
OnPlayerSpawn(playerid)
{
    
SpawnToHospital(playerid);
    return 
1;
}
SpawnToHospital(playerid)
{
       if(
IsPlayerInRangeOfPoint(playerid100, -2657.7336,630.0181,14.4531)) //SF Hospital
       
{
           new 
ligonine random(6);
           switch(
ligonine)
           {
               case 
0SetPlayerPos(playerid,2485.4375,-4534.1465,1001.9906), SetPlayerFacingAngle(playerid175.3011);
               case 
1SetPlayerPos(playerid,2490.5200,-4534.7285,1001.9906), SetPlayerFacingAngle(playerid,181.2008);
               case 
2SetPlayerPos(playerid,2495.6191,-4533.9224,1001.9906), SetPlayerFacingAngle(playerid,174.2484);
               case 
3SetPlayerPos(playerid,2498.6262,-4542.7705,1001.9906), SetPlayerFacingAngle(playerid,353.4029);
               case 
4SetPlayerPos(playerid,2493.0801,-4542.7397,1001.9906), SetPlayerFacingAngle(playerid,10.6898);
               case 
5SetPlayerPos(playerid,2485.8608,-4543.0127,1001.9906), SetPlayerFacingAngle(playerid,2.7979);
           }
           
TogglePlayerControllable(playeridfalse);
           
ApplyAnimation(playerid"BEACH""SitnWait_loop_W"4.00000010000);
           
SetTimerEx("ToggleHP"3000false"d"playerid);
           
SetPlayerInterior(playerid2);
           
ResetPlayerWeaponsEx(playerid);
           
AntiCheatSystem[playerid][pNoCheckAirbreak] = 5;
           
zInfo[playerid][Mires] = 0;
           
KillTimer(GrobimasEx[playerid]);
           
KillTimer(TaisoMasinaEx[playerid]);
           
KillTimer(KraunaMasinaEx[playerid]);
           return 
1;
       }
       if(
IsPlayerInRangeOfPoint(playerid50, -316.8019,1055.4281,19.7422)) //FC Hospital
       
{
           new 
ligonine random(3);
           switch(
ligonine)
           {
               case 
0SetPlayerPos(playerid,342.9870,-1501.7476,524.7386), SetPlayerFacingAngle(playerid180.9297);
               case 
1SetPlayerPos(playerid,343.1917,-1503.4216,524.7386), SetPlayerFacingAngle(playerid185.3358);
               case 
2SetPlayerPos(playerid,343.1035,-1504.9077,524.7386), SetPlayerFacingAngle(playerid177.3499);
           }
           
SetPlayerInterior(playerid2);
           
ResetPlayerWeaponsEx(playerid);
           
AntiCheatSystem[playerid][pNoCheckAirbreak] = 5;
           
zInfo[playerid][Mires] = 0;
           
KillTimer(GrobimasEx[playerid]);
           
KillTimer(TaisoMasinaEx[playerid]);
           
KillTimer(KraunaMasinaEx[playerid]);
           return 
1;
       }
       return 
1;

Reply


Forum Jump:


Users browsing this thread: 3 Guest(s)