2 questions
#1

Hello,

1) How can I add a red marker inside a house and then if a person enters it, it teleports him somewhere (ex farm) ?

2) Is it possible to add music to house with no music like for example in Jizzys club or in strip clubs?

ty :P
Reply
#2

1. SetPlayerCheckPoint.
2. PlayerPlaySound.
Reply
#3

SetPlayerCheckpoint(playerid,2324.6179,-1148.6368,1050.7101,185.0821);
return Teleport(playerid, -36.106513, -6.884305, 2.938885, 67.878601, 0, false);

Is this correct and under what line I need to paste it?
Reply
#4

Bump..
Reply
#5

At Top Of Script:

Код:
 new InteriorTimer;
Код:
 forward GetInteriorOfAllPlayers()
OnGameModeInit:

Код:
 InteriorTimer = SetTimer("GetInteriorOfAllPlayers", 1000, true);
OnGameModeExit:

Код:
 KillTimer(InteriorTimer);
and public GetInteriorOfAllPlayers:

Код:
for ( new i = 0; i < MAX_PLAYERS; i++ ) {
 if ( GetPlayerInterior(i) == 0 ) {
 PlayerPlaySound(i, 1188, 0.0, 0.0, 0.0);
 } else if ( GetPlayerInterior(i) == 'Interior Id You Want' ) {
 PlayerPlaySound(i, 1187, 0.0, 0.0, 0.0);
 }
}
There you go
Reply
#6

mind indentation:
pawn Код:
for ( new i = 0; i < MAX_PLAYERS; i++ )
{
  if ( GetPlayerInterior(i) == 0 )
  {
    PlayerPlaySound(i, 1188, 0.0, 0.0, 0.0);
  }
  else
  if ( GetPlayerInterior(i) == 'Interior Id You Want' )
  {
    PlayerPlaySound(i, 1187, 0.0, 0.0, 0.0);
  }
}
Reply
#7

Wait, what?
C:\Program Files\Rockstar Games\GTA San Andreas\gamemodes\ponyfarming.pwn(24) : error 001: expected token: ";", but found "-identifier-"
C:\Program Files\Rockstar Games\GTA San Andreas\gamemodes\ponyfarming.pwn(46) : error 027: invalid character constant
C:\Program Files\Rockstar Games\GTA San Andreas\gamemodes\ponyfarming.pwn(46) : error 017: undefined symbol "nterior"
C:\Program Files\Rockstar Games\GTA San Andreas\gamemodes\ponyfarming.pwn(46) : error 017: undefined symbol "Id"
C:\Program Files\Rockstar Games\GTA San Andreas\gamemodes\ponyfarming.pwn(46) : fatal error 107: too many error messages on one line

How to compile this? I need the marker inside the interior..
SetPlayerCheckpoint(playerid,2324.6179,-1148.6368,1050.7101,185.0821);
return Teleport(playerid, -36.106513, -6.884305, 2.938885, 67.878601, 0, false);
Reply
#8

Actually, I've got code from area51, but the marker doesn't show up? Help?

public OnPlayerEnterCheckpoint(playerid) {

switch (gPlayerCheckpointStatus[playerid]) {

case CHECKPOINT_PLANE:

{

GameTextForPlayer(playerid, "Welcome home", 2000, 5);

SetPlayerInterior(playerid,0);

SetPlayerPos(playerid, -36.106513, -6.884305, 2.938885);

SetPlayerCheckpoint(playerid,2324.5945,-1144.5468,1050.7031, 168.7494);

gPlayerCheckpointStatus[playerid] = CHECKPOINT_AREA51;

}

case CHECKPOINT_AREA51:

{

DisablePlayerCheckpoint(playerid);

gPlayerCheckpointStatus[playerid] = CHECKPOINT_NONE;


}

default:

{

DisablePlayerCheckpoint(playerid);

}

}

return 1;

}
Reply
#9

Nevermind, I got that sorted but one more question.

How to remove this red dot from the map? It shows that the checkpoint is here on the map but how to remove the dot?
Reply
#10

You can't with a checkpoint, use a pickup for that.
Reply
#11

Or you can detect post, and set the position(rp style).
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)