How to enter to interior with 'Enter' ? - Printable Version
+- SA-MP Forums Archive (
https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (
https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (
https://sampforum.blast.hk/forumdisplay.php?fid=12)
+---- Forum: Help Archive (
https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: How to enter to interior with 'Enter' ? (
/showthread.php?tid=137844)
How to enter to interior with 'Enter' ? -
povilaslt2 - 30.03.2010
I verry need this in RolePlay. Very thanks who help me
Re: How to enter to interior with 'Enter' ? -
V1ceC1ty - 30.03.2010
Add DisableInteriorEnterExits(); to OnGameModeInit, Create a pickup where you want a player to enter an interior.
Example:
pawn Код:
new pickup;
public OnGameModeInit()
{
DisableInteriorEnterExits();
pickup = CreatePickup(1239, 23, 3000, 3000, 3000, 0);
return 1;
}
public OnPlayerPickUpPickup(playerid, pickupid)
{
if(pickupid == pickup)
{
SetPlayerInterior(playerid, 1);
SetPlayerPos(playerid, 3000, 3000, 3000);
}
return 1;
}
Also can work with checkpoints but in my opinion for someone new to pawn, pickups could be easier. And not to mention look a lot better.
Re: How to enter to interior with 'Enter' ? -
povilaslt2 - 30.03.2010
This is when you enter in pickup you enter in the iterior... I need when click 'Enter' entering you to interior
Re: How to enter to interior with 'Enter' ? -
V1ceC1ty - 30.03.2010
Quote:
|
Originally Posted by povilaslt2
This is when you enter in pickup you enter in the iterior... I need when click 'Enter' entering you to interior
|
Oh so a dialog box?
Re: How to enter to interior with 'Enter' ? -
povilaslt2 - 30.03.2010
Yea
Re: How to enter to interior with 'Enter' ? -
Naruto4 - 30.03.2010
No. Key Detecting.
Код:
#define KEY_ENTER 16
#define PRESSED(%0) \
(((newkeys & (%0)) == (%0)) && ((oldkeys & (%0)) != (%0)))
public OnPlayerKeyStateChange(playerid, newkeys, oldkeys)
{
if (PRESSED(KEY_ENTER))
{
if(IsPlayerInRangeOfPoint(..))
{
SetPlayerPos(..);
SetPlayerInterior(...);
}
}
return 1;
}
Re: How to enter to interior with 'Enter' ? -
povilaslt2 - 30.03.2010
This in gamemode or filtersrcipt?
Re: How to enter to interior with 'Enter' ? -
Naruto4 - 30.03.2010
gamemode
Re: How to enter to interior with 'Enter' ? -
povilaslt2 - 30.03.2010
I have this error:
C:\Users\Donatas\Desktop\KGRP\gamemodes\KGRP.pwn(4 3916) : error 010: invalid function or declaration
C:\Users\Donatas\Desktop\KGRP\gamemodes\KGRP.pwn(4 391

: error 010: invalid function or declaration
C:\Users\Donatas\Desktop\KGRP\gamemodes\KGRP.pwn(4 3924) : error 010: invalid function or declaration
Re: How to enter to interior with 'Enter' ? -
povilaslt2 - 30.03.2010
Can you give me the file?