[Include] entrance.inc - Create interiors easily
#1

Description:
With this include, you can create interiors quickly and easily.

Functions:
PHP код:
Entrance:CreateEntrance(name[], Float:out_xFloat:out_yFloat:out_zFloat:out_aout_iout_vFloat:in_xFloat:in_yFloat:in_zFloat:in_ain_iin_v
- Creates an entrance.

PHP код:
GetEntranceName(Entrance:indexname[], length sizeof(name)) 
- Gets the name of the entrance.

PHP код:
IsPlayerInRangeOfEntrance(playeridEntrance:indexFloat:range 3.0
- Checks if the player is near an entrance.

PHP код:
IsPlayerInEntrance(playeridEntrance:indexFloat:range 20.0
- Checks if the player is inside an entrance.

PHP код:
GetPlayerClosestEntranceID(playeridFloat:range 3.0
- Gets the closest entrance from the player.

Example:
PHP код:
new Entrance:CityHall
public 
OnFilterScriptInit() 

    
CityHall CreateEntrance("Los Santos City Hall"1481.0654, -1771.875518.7958356.383800390.1687173.80721008.382890.0000369); 
    return 
1

public 
OnPlayerEnterEntrance(playeridEntrance:entranceid

    if (
entranceid == CityHall
    { 
        
SendClientMessage(playerid, -1"Welcome to City Hall."); 
    } 
    return 
1

public 
OnPlayerExitEntrance(playeridEntrance:entranceid

    if (
entranceid == CityHall
    { 
        
SendClientMessage(playerid, -1"You left City Hall."); 
    } 
    return 
1

Pastebin
Reply
#2

Nice!
Reply
#3

Can you provide a pastebin or any other website that allow you to share directly the source code?
******* ; no thanks.
Reply
#4

Quote:
Originally Posted by Dayrion
Посмотреть сообщение
Can you provide a pastebin or any other website that allow you to share directly the source code?
******* ; no thanks.
btw their is already as i see
Reply
#5

Код:
public OnPlayerKeyStateChange(playerid, newkeys, oldkeys)
{
    if ((newkeys & KEY_SECONDARY_ATTACK))
    {
        for (new Entrance:i; i < gTotalEntrances; i ++)
        {
            if (IsPlayerInRangeOfEntrance(playerid, i))
            {
You are using the streamer but not using the streamer at the same time let it do the work for you and use dynamic areas to detect when a player enters them. You can set the extraid to reference the teleport data array no more looping.

Your system is a start but lacks completion at this time. Fix it.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)