Problem
#1

I don't cant enter to city hall
here is code


Код:
public OnPlayerKeyStateChange(playerid, newkeys, oldkeys)
{
//Bolnica-Enter
    if( newkeys == KEY_SECONDARY_ATTACK ) 
    {
    if( IsPlayerInRangeOfPoint( playerid, 3.0, 1172.8816,-1321.5386,15.3990 ) ) 
    {
    SetPlayerPos( playerid, 40, 2, 1000 );
    SetPlayerInterior( playerid, 1 );
    SendClientMessage(playerid, COLOR_GREEN, "Dobro dosli u Bolnicu.");
    return 1;
    }
    }
//Bolnica-Exit
    if( newkeys == KEY_SECONDARY_ATTACK ) 
    {
    if( IsPlayerInRangeOfPoint( playerid, 3.0, 39.5194,1.5769,999.0019 ) )
    {
    SetPlayerPos( playerid,  1172.8816,-1321.5386,15.3990 );
    SetPlayerInterior( playerid, 0);
    }
	return 1;
	}

//Gradska Vjecnica-Enter
    if( newkeys == KEY_SECONDARY_ATTACK )
    {
        if( IsPlayerInRangeOfPoint( playerid, 3.0, 1481.0033,-1771.5490,18.7958 ) && GetPlayerInterior(playerid)==0)
        {
        SetPlayerPos(playerid, 386.5259, 173.6381, 1008.3828);
        SetPlayerInterior(playerid, 3);
        SendClientMessage(playerid, COLOR_GREEN, "Dobro dosli u gradsku vjecnicu.");
        return 1;
        }
        if( IsPlayerInRangeOfPoint(playerid, 3.0, 389.4573,173.6963,1008.3828) &&  GetPlayerInterior(playerid)==3)
        {
        SetPlayerPos( playerid, 1481.0033,-1771.5490,18.7958 );
        SetPlayerInterior( playerid, 0);
        return 1;
        }
    }
    return 1;
}
Reply
#2

Wait - where is your problem? What can you not enter, the city hall or the hospital?
Reply
#3

on the city hall im press f and nothing happened
Reply
#4

pawn Код:
public OnPlayerKeyStateChange(playerid, newkeys, oldkeys)
{
    if(newkeys & KEY_SECONDARY_ATTACK )
    {
       if(IsPlayerInRangeOfPoint( playerid,3.0,1172.8816,-1321.5386,15.3990))
       {
          SetPlayerPos( playerid,40,2,1000);
          SetPlayerInterior(playerid,1);
          return SendClientMessage(playerid, COLOR_GREEN, "Dobro dosli u Bolnicu.");
       }
       else if(IsPlayerInRangeOfPoint(playerid,3.0, 39.5194,1.5769,999.0019))
       {
          SetPlayerPos(playerid,1172.8816,-1321.5386,15.3990);
          return SetPlayerInterior(playerid,0);
       }
       else if(IsPlayerInRangeOfPoint(playerid,3.0,1481.0033,-1771.5490,18.7958)&&GetPlayerInterior(playerid)==0)
       {
           SetPlayerPos(playerid,386.5259, 173.6381, 1008.3828);
           SetPlayerInterior(playerid,3);
           return SendClientMessage(playerid,COLOR_GREEN,"Dobro dosli u gradsku vjecnicu.");
       }
       else if(IsPlayerInRangeOfPoint(playerid,3.0,389.4573,173.6963,1008.3828)&&GetPlayerInterior(playerid)==3)
       {
           SetPlayerPos(playerid,1481.0033,-1771.5490,18.7958);
           return SetPlayerInterior(playerid, 0);
       }
    }
    return 1;
}
Try this.
Reply
#5

Quote:
Originally Posted by Grand_Micha
Посмотреть сообщение
pawn Код:
public OnPlayerKeyStateChange(playerid, newkeys, oldkeys)
{
    if(newkeys & KEY_SECONDARY_ATTACK )
    {
       if(IsPlayerInRangeOfPoint( playerid,3.0,1172.8816,-1321.5386,15.3990))
       {
          SetPlayerPos( playerid,40,2,1000);
          SetPlayerInterior(playerid,1);
          return SendClientMessage(playerid, COLOR_GREEN, "Dobro dosli u Bolnicu.");
       }
       else if(IsPlayerInRangeOfPoint(playerid,3.0, 39.5194,1.5769,999.0019))
       {
          SetPlayerPos(playerid,1172.8816,-1321.5386,15.3990);
          return SetPlayerInterior(playerid,0);
       }
       else if(IsPlayerInRangeOfPoint(playerid,3.0,1481.0033,-1771.5490,18.7958)&&GetPlayerInterior(playerid)==0)
       {
           SetPlayerPos(playerid,386.5259, 173.6381, 1008.3828);
           SetPlayerInterior(playerid,3);
           return SendClientMessage(playerid,COLOR_GREEN,"Dobro dosli u gradsku vjecnicu.");
       }
       else if(IsPlayerInRangeOfPoint(playerid,3.0,389.4573,173.6963,1008.3828)&&GetPlayerInterior(playerid)==3)
       {
           SetPlayerPos(playerid,1481.0033,-1771.5490,18.7958);
           return SetPlayerInterior(playerid, 0);
       }
    }
    return 1;
}
Try this.
work thanks <3
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)