2 questions -
yelkreb - 01.03.2009
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
Re: 2 questions -
Rks25 - 01.03.2009
1. SetPlayerCheckPoint.
2. PlayerPlaySound.
Re: 2 questions -
yelkreb - 01.03.2009
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?
Re: 2 questions -
yelkreb - 02.03.2009
Bump..
Re: 2 questions -
JaYmE - 02.03.2009
At Top Of Script:
Код:
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
Re: 2 questions -
Rks25 - 02.03.2009
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);
}
}
Re: 2 questions -
yelkreb - 02.03.2009
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);
Re: 2 questions -
yelkreb - 02.03.2009
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;
}
Re: 2 questions -
yelkreb - 02.03.2009
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?
Re: 2 questions -
Marcel - 02.03.2009
You can't with a checkpoint, use a pickup for that.
Re: 2 questions -
Rks25 - 02.03.2009
Or you can detect post, and set the position(rp style).