SA-MP Forums Archive
Interior Name - 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)
+--- Thread: Interior Name (/showthread.php?tid=579097)



Interior Name - STONEGOLD - 24.06.2015

Well, How can i put interior name

For example:


Player A in Ammunation of Sf ocean flat.


So it should be like this:

Location: Ocean Flat (Ammunation) <==
Location: Market (Ammunation) <==

or if Player A in Pizza shop

Location: Ocean Flat (PizzaShop) <==

How can i set Interior name?


Re: Interior Name - SecretBoss - 24.06.2015

https://sampforum.blast.hk/showthread.php?tid=161741

This script is what you want, I think if you want add some more location you can edit it with your custom coordinates


Re : Interior Name - KillerDVX - 24.06.2015

I'm not pretty sure, but you can try this :

PHP код:
public OnGameModeInit()
{
    
SetTimer("CheckInterior",3000,1);
    return 
1;
}
forward CheckInterior(playerid);
public 
CheckInterior(playerid)
{
        new 
string[128];
        
format(stringsizeof(string), "You are in : %i"GetPlayerInterior(playerid)); 
        
GameTextForPlayer(playeridstring30005);




Re: Re : Interior Name - J0sh... - 24.06.2015

Quote:
Originally Posted by KillerDVX
Посмотреть сообщение
I'm not pretty sure, but you can try this :

PHP код:
public OnGameModeInit()
{
    
SetTimer("CheckInterior",3000,1);
    return 
1;
}
forward CheckInterior(playerid);
public 
CheckInterior(playerid)
{
        new 
string[128];
        
format(stringsizeof(string), "You are in : %i"GetPlayerInterior(playerid)); 
        
GameTextForPlayer(playeridstring30005);

Didn't issue the playerid. Should be onplayerconnect with the "i", playerid); parameter with SetTimerEx. He wants the name, if he wants the number he could of done /interior.

@OP, You could use OnInterior change for a player and use something like this:
PHP код:
    GetInteriorName(playerid)
    {
       switch(
GetPlayerInterior(playerid))
       {
           case 
1format(..
       }
    return 
1;
    } 
case 1 and that are interiors.


Re: Re : Interior Name - AndySedeyn - 24.06.2015

Quote:
Originally Posted by KillerDVX
Посмотреть сообщение
I'm not pretty sure, but you can try this :

PHP код:
public OnGameModeInit()
{
    
SetTimer("CheckInterior",3000,1);
    return 
1;
}
forward CheckInterior(playerid);
public 
CheckInterior(playerid)
{
        new 
string[128];
        
format(stringsizeof(string), "You are in : %i"GetPlayerInterior(playerid)); 
        
GameTextForPlayer(playeridstring30005);

Quote:
Originally Posted by Jamester
Посмотреть сообщение
Didn't issue the playerid. Should be onplayerconnect with the "i", playerid); parameter with SetTimerEx. He wants the name, if he wants the number he could of done /interior.

@OP, You could use OnInterior change for a player and use something like this:
PHP код:
    GetInteriorName(playerid)
    {
       switch(
GetPlayerInterior(playerid))
       {
           case 
1format(..
        }
    }
    return 
1
case 1 and that are interiors.
That ^.
@KillerDVX, why do you declare that variable with a size of 128 bits? The string's maximum size is approx. 15 characters ( = 15 bits). That's a total waste of 113 bits!


Re : Re: Re : Interior Name - KillerDVX - 24.06.2015

Quote:
Originally Posted by AndySedeyn
Посмотреть сообщение
That ^.
@KillerDVX, why do you declare that variable with a size of 128 bits? The string's maximum size is approx. 15 characters ( = 15 bits). That's a total waste of 113 bits!
Oh.. My fault said so ^^'.

Thanks for the recall .

KillerDVX,




Re: Re : Re: Re : Interior Name - AndySedeyn - 24.06.2015

Quote:
Originally Posted by KillerDVX
Посмотреть сообщение


Oh.. My fault said so ^^'.

Thanks for the recall .

KillerDVX,

You should also do some research on timers and what they actually do. If you were to use a timer for that (correctly) then it will just spam the player's screen with game text even when he hasn't changed interiors.


Re: Interior Name - STONEGOLD - 24.06.2015

Well, I have 3 ammunations and different VirtualWorld. So, How can i set name them?
I mean

I have an ammunation in Angel Pine
Ammunation in Oceal Flat
Ammunation in EL Q

... is this possible i can set interior names by checkpoint? if yes please post some codes.


Re: Interior Name - J0sh... - 24.06.2015

Quote:
Originally Posted by STONEGOLD
Посмотреть сообщение
Well, I have 3 ammunations and different VirtualWorld. So, How can i set name them?
I mean

I have an ammunation in Angel Pine
Ammunation in Oceal Flat
Ammunation in EL Q
PHP код:
GetInteriorName(playerid)
{
      new 
Float:xFloat:yFloat:z;
      
GetPlayerPos(playeridxyz);
      if(
GetPlayerInterior(playerid) == .. && == .. && ..)
      {
           
format(..
      }
      else if(..
      return 
1;




Re: Interior Name - AndySedeyn - 24.06.2015

Quote:
Originally Posted by STONEGOLD
Посмотреть сообщение
Well, I have 3 ammunations and different VirtualWorld. So, How can i set name them?
I mean

I have an ammunation in Angel Pine
Ammunation in Oceal Flat
Ammunation in EL Q

... is this possible i can set interior names by checkpoint? if yes please post some codes.
No idea what you mean with that, but there are more than 1 interior ID's for an ammunition. You can simply use a different ammunition interior ID for a different location. In fact, there are 6 different interior ID's for an ammunition, excluding the fire range and the booths.

http://weedarr.wikidot.com/interior