Questions on Interior Weapons && Markers
#1

Could somebody give me a clue as to how I can use SetPlayerArmedWeapon to disable interior weapons in the same way that AllowInteriorWeapons(0); would work.

AllowInteriorWeapons has either been completely removed, or doesn't work at all. Had a look at the function on wiki, doesn't help me.

Thanks.

Also, I have a problem. In my gamemode I have a minigame, which creates a car in random places around the city with the "Objective" so it can be seen on the mpa. Now because cars are streamed in, nobody can see this car on their map unless they are near it .. how can this be solved?

Another question .. are player markers streamed? Seems to me like they are, and if they are .. is there a way I can turn them off so they are not streamed. I want to be able to see all players markers on the map not just players that are in range.
Reply
#2

pawn Код:
public OnPlayerUpdate(playerid)
{
  if(GetPlayerInterior(playerid) != 0)
  {
     SetPlayerArmedWeapon(playerid, 0);
  }
  return 1;
}
Not the most efficient way, but it'll work.
Reply
#3

Quote:
Originally Posted by Calgon
pawn Код:
public OnPlayerUpdate(playerid)
{
  if(GetPlayerInterior(playerid) != 0)
  {
     SetPlayerArmedWeapon(playerid, 0);
  }
  return 1;
}
Not the most efficient way, but it'll work.
Will it? Some interiors use interior universe 0 do they not?
Reply
#4

Quote:
Originally Posted by » Pawnst★r «
Will it? Some interiors use interior universe 0 do they not?
This one is the only one which can be found on the SA-MP's Wiki:
Quote:
Interior Universe ID X Y Z Description Singleplayer
Dillimore Gas Station 0 664.19 -570.73 16.34 Only South & West Wall + Floor solid Mission "Tanker Commander"
Reply
#5

Quote:
Originally Posted by » Pawnst★r «
Quote:
Originally Posted by Calgon
pawn Код:
public OnPlayerUpdate(playerid)
{
  if(GetPlayerInterior(playerid) != 0)
  {
     SetPlayerArmedWeapon(playerid, 0);
  }
  return 1;
}
Not the most efficient way, but it'll work.
Will it? Some interiors use interior universe 0 do they not?
In every interior except ones that are actually based in interior 0. So things like K.A.C.C Military Fuels that don't have an entry point etc. That includes Don's example. You can modify it to work like that, but it'd be useless.

And for the car streaming, just set a checkpoint near the car or change the server.cfg to stream from a longer distance.
Reply
#6

Quote:
Originally Posted by Don Correlli
Quote:
Originally Posted by » Pawnst★r «
Will it? Some interiors use interior universe 0 do they not?
This one is the only one which can be found on the SA-MP's Wiki:
Quote:
Interior Universe ID X Y Z Description Singleplayer
Dillimore Gas Station 0 664.19 -570.73 16.34 Only South & West Wall + Floor solid Mission "Tanker Commander"
Great, I was just thinking back to when I was playiong around with interiors in 0.2x .. something made me think that there were more interiors in Universe 0. Thanks for the code Calgon, I'll give it a go . Any clue as to how to solve the other problems .. with the markers and such?
Reply
#7

Quote:
Originally Posted by Seif_ [adream-rp.com
]
They are streamed. In a_samp.inc there's this:
pawn Код:
#define PLAYER_MARKERS_MODE_OFF         (0)
#define PLAYER_MARKERS_MODE_GLOBAL      (1)
#define PLAYER_MARKERS_MODE_STREAMED    (2)
So simply add this in OnGameModeInit
pawn Код:
ShowPlayerMarkers(PLAYER_MARKERS_GLOBAL);
Fantastic, thanks

Edit: You meant .. ShowPlayerMarkers(PLAYER_MARKERS_MODE_GLOBAL); ?
Reply
#8

Quote:
Originally Posted by Calgon
Посмотреть сообщение
pawn Код:
public OnPlayerUpdate(playerid)
{
  if(GetPlayerInterior(playerid) != 0)
  {
     SetPlayerArmedWeapon(playerid, 0);
  }
  return 1;
}
Not the most efficient way, but it'll work.
That seems to work for me. Thanks for posting it.
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)