[Ajuda] Desativar Checkpoint - Printable Version
+- SA-MP Forums Archive (
https://sampforum.blast.hk)
+-- Forum: Non-English (
https://sampforum.blast.hk/forumdisplay.php?fid=9)
+--- Forum: Languages (
https://sampforum.blast.hk/forumdisplay.php?fid=33)
+---- Forum: Português/Portuguese (
https://sampforum.blast.hk/forumdisplay.php?fid=34)
+---- Thread: [Ajuda] Desativar Checkpoint (
/showthread.php?tid=613887)
Desativar Checkpoint -
RianRBS - 01.08.2016
Alguem pode me ajudar? estуu criando uma auto escola, dai eu eu coloquei 10 Checkspoints para orientar o jogador
eu queria que quando o player fosse em 1 checkpoint ele fosse desativado e eu nгo fasso a menor нdeia de como fazer isso.
meu checkpoint
Код:
CheckpointsFix[73] = CreateDynamicCP(1207.6324, -40.8146, 1000.9531, 1.0, -1, -1, -1, 100.0);
Re: Desativar Checkpoint -
CyNiC - 02.08.2016
pawn Код:
public OnPlayerEnterDynamicCP(playerid, checkpointid)
{
if(checkpointid == CheckpointsFix[0])//--- Suponha que aqui seja a recepзгo da auto escola
{
SendClientMessage(playerid, cor, "{FF4040}Jessy:{FFFFFF} Olб, seja bem vindo a auto escola.");
DisableDynamicCP(checkpointid);
return 1;
}
if(checkpointid == CheckpointsFix[1])//--- Suponha que aqui seja um cartaz da auto escola
{
SendClientMessage(playerid, cor, "CARTAZ DA AUTO ESCOLA: == Promoзгo == Sua carteira AB por $600,00!");
DisableDynamicCP(checkpointid);
return 1;
}
}
Se for muitos checkpoints, fica mais bonito se usar
switch
Re: Desativar Checkpoint -
iJonas - 07.08.2016
Checkpoint: https://sampwiki.blast.hk/wiki/DisablePlayerCheckpoint
Race Checkpoint: https://sampwiki.blast.hk/wiki/DisablePlayerRaceCheckpoint
Re: Desativar Checkpoint -
F1N4L - 08.08.2016
Quote:
Originally Posted by CyNiC
pawn Код:
public OnPlayerEnterDynamicCP(playerid, checkpointid) { if(checkpointid == CheckpointsFix[0])//--- Suponha que aqui seja a recepзгo da auto escola { SendClientMessage(playerid, cor, "{FF4040}Jessy:{FFFFFF} Olб, seja bem vindo a auto escola."); DisableDynamicCP(checkpointid); return 1; } if(checkpointid == CheckpointsFix[1])//--- Suponha que aqui seja um cartaz da auto escola { SendClientMessage(playerid, cor, "CARTAZ DA AUTO ESCOLA: == Promoзгo == Sua carteira AB por $600,00!"); DisableDynamicCP(checkpointid); return 1; } }
Se for muitos checkpoints, fica mais bonito se usar switch
|
Se for com streamer, o que seria a melhor opзгo neste caso, use a funзгo
TogglePlayerDynamicCP(playerid, checkpointid, toggle) em vez de
DisableDynamicCP(checkpointid)
toggle = 0 (oculta)
toggle = 1 (mostra)
Re: Desativar Checkpoint -
RianRBS - 28.02.2017
Obrigado a todos!