[AJUDA]Sistema de Rota -
SuperGame - 31.05.2011
Pessoal quero saber se vocкs podem me ajudar colocando um sistema de rota para o onibus tipo, o jogador entra no onibus e escreve /rota, ai vai seguindo os checkpoints, no final ele recebe uma quantia, so quero a parte do CP, eu nao sei mecher com CP.
Re: [AJUDA]Sistema de Rota -
TheGarfield - 31.05.2011
existem vбrios tutoriais sobre Checkpoints, sу procurar !
Re: [AJUDA]Sistema de Rota -
Shadoww5 - 01.06.2011
PHP код:
//TROQUE X, Y e Z PELAS COORDENADAS DOS CHECKPOINTS.
public OnPlayerCommandText(playerid, cmdtext[])
{
if(strcmp(cmdtext,"/rota",true) == 0)
{
if(GetPVarInt(playerid,"Rota") > 0) return SendClientMessage(playerid, -1," Vocк jб estб em uma corrida.");
SendClientMessage(playerid,-1,"Vocк acaba de iniciar uma corrida. Siga os checkpoints para concluir sua rota.");
SetPlayerCheckpoint(playerid, X, Y, Z, 8.0);
SetPVarInt(playerid,"Rota",1);
return 1;
}
return 0;
}
public OnPlayerEnterCheckpoint(playerid)
{
switch(GetPVarInt(playerid,"Rota"))
{
case 1:
{
SetPlayerCheckpoint(playerid, X, Y, Z, 8.0);
SendClientMessage(playerid, -1, "Checkpoints: 1 / 5");
SetPVarInt(playerid,"Rota",2);
return 1;
}
case 2:
{
SetPlayerCheckpoint(playerid, X, Y, Z, 8.0);
SendClientMessage(playerid, -1, "Checkpoints: 2 / 5");
SetPVarInt(playerid,"Rota",3);
return 1;
}
case 3:
{
SetPlayerCheckpoint(playerid, X, Y, Z, 8.0);
SendClientMessage(playerid, -1, "Checkpoints: 3 / 5");
SetPVarInt(playerid,"Rota",4);
return 1;
}
case 4:
{
SetPlayerCheckpoint(playerid, X, Y, Z, 8.0);
SendClientMessage(playerid, -1, "Checkpoints: 4 / 5");
SetPVarInt(playerid,"Rota",5);
return 1;
}
case 5:
{
DisablePlayerCheckpoint(playerid);
SendClientMessage(playerid, -1, "Checkpoints: 5 / 5");
SendClientMessage(playerid, -1, "Corrida concluнda.");
GivePlayerMoney(playerid, VALOR); //LEMBRE-SE DE TROCAR "VALOR" PELO DINHEIRO QUE VOCК QUER DAR AO JOGADOR
SetPVarInt(playerid,"Rota",0);
return 1;
}
return 1;
}
return 1;
}
Re: [AJUDA]Sistema de Rota -
TheGarfield - 01.06.2011
Correto й:
pawn Код:
SetPlayerCheckPoint(playerid, X, Y, Z, Xprox, Yprox, Zprox, 10.0);
!
Re: [AJUDA]Sistema de Rota -
Shadoww5 - 01.06.2011
Atualizado.
Re: [AJUDA]Sistema de Rota -
SuperGame - 01.06.2011
Obrigado Shadoww5 e TheGarfield, vocкs foram de grande ajuda.
Re: [AJUDA]Sistema de Rota -
TheGarfield - 01.06.2011
Quote:
Originally Posted by Shadoww5
Atualizado.
|
ainda estб errado!
OLHE:
SetPlayerCheckPoint(playerid, X, Y, Z, Xproximo, Yproximo, Zproximo, 10.0);
Re: [AJUDA]Sistema de Rota -
Rodox_Mortein - 01.06.2011
garfield o SetPlayerCheckPoint e assim SetPlayerCheckPoint(playerid, X , Y, Z, TAMANHO); o SetPlayerRaceCheckPoint que e do jeito que vc ta ensinando .... SetPlayerCheckPoint(playerid, X, Y, Z, Xproximo, Yproximo, Zproximo, TAMANHO);
Re: [AJUDA]Sistema de Rota -
Shadoww5 - 01.06.2011
https://sampwiki.blast.hk/wiki/SetPlayerCheckpoint