Interior Name
#1

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?
Reply
#2

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
Reply
#3

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);

Reply
#4

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.
Reply
#5

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!
Reply
#6

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,

Reply
#7

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.
Reply
#8

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.
Reply
#9

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;

Reply
#10

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
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)