City Hall
#1

When you enter the town hall and press F to exit it works ok, but when you go into the hall and then you'll fi shift in the sky


here is command




Код:
public OnPlayerKeyStateChange(playerid, newkeys, oldkeys)
{
	//Gradska Vjecnica-Enter
	if( newkeys == KEY_SECONDARY_ATTACK ) 
{
if( IsPlayerInRangeOfPoint( playerid, 3.0, 1481.0033,-1771.5490,18.7958 ) ) 
{
SetPlayerPos(playerid, 386.5259, 173.6381, 1008.3828);
SetPlayerInterior(playerid, 3);
GameTextForPlayer( playerid, "Los Santos Vjecnica", 3000, 1 );
return 1;
}
}
	//Gradska Vjecnica-Exit
	if( newkeys == KEY_SECONDARY_ATTACK ) 
{
if( IsPlayerInRangeOfPoint( playerid, 3.0, 389.4573,173.6963,1008.3828 ) ) 
SetPlayerPos( playerid, 1481.0033,-1771.5490,18.7958 ); 
SetPlayerInterior( playerid, 0); 
return 1;
}

//
	return 1;
}
Reply
#2

pawn Код:
public OnPlayerKeyStateChange(playerid, newkeys, oldkeys)
{
//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);
        GameTextForPlayer( playerid, "Los Santos Vjecnica", 3000, 1 );
        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;
}
Your code had some {} errors.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)