Help me please
#4

Код:
public OnPlayerKeyStateChange(playerid, newkeys, oldkeys)
{
    if ((oldkeys & KEY_SECONDARY_ATTACK) && !(newkeys & KEY_SECONDARY_ATTACK)){//If the player presses enter button
       if(IsPlayerInRangeOfPoint(playerid, 3.0, X, Y, Z)) //Change X, Y and Z to the position of your desired 'enter position'
       {
        SetPlayerVirtualWorld(playerid, 1); //change 1 to whatever you like
        SetPlayerInterior(playerid, <interior number>); //change <inter.. to the interior number
        SetPlayerPos(playerid, X, Y, Z); //Change xyz to the interior position
        SendClientMessage(playerid,0xFFFFFFFF,"You have entered the house!");
       }
    }
    return 1;
}
Hope this helps!
Reply


Messages In This Thread
Help me please - by Laure - 11.12.2012, 12:05
Re: Help me please - by RajatPawar - 11.12.2012, 12:12
Re: Help me please - by Laure - 11.12.2012, 12:13
Re: Help me please - by Spotlight - 11.12.2012, 12:15

Forum Jump:


Users browsing this thread: 1 Guest(s)