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(string, sizeof(string), "You are in : %i", GetPlayerInterior(playerid));
GameTextForPlayer(playerid, string, 3000, 5);
}
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(string, sizeof(string), "You are in : %i", GetPlayerInterior(playerid));
GameTextForPlayer(playerid, string, 3000, 5);
}
|
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 1: format(..
}
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(string, sizeof(string), "You are in : %i", GetPlayerInterior(playerid));
GameTextForPlayer(playerid, string, 3000, 5);
}
|
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 1: format(..
}
}
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:x, Float:y, Float:z;
GetPlayerPos(playerid, x, y, z);
if(GetPlayerInterior(playerid) == .. && x == .. && ..)
{
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