[Ajuda] ajuda aki
#1

PHP код:
if (strcmp("/plixo"cmdtexttrue10) == 0) {
    if(
GetVehicleModel(GetPlayerVehicleID(playerid)) == 451) {
       if(
PlayerInfoplayerid ][pProfissao] == Mecanico) {
    
SendClientMessage(playerid,Vermelho,"Vocк jб estб fazendo a Missгo!");
    return 
1;
    }
    new 
rand random(sizeof(checkpoints));
    
SetPlayerCheckpoint(playerid,checkpoints[rand][0],checkpoints[rand][1],checkpoints[rand][2],checkpoints[rand][3]);
     
GameTextForPlayer(playerid"~g~Vocк comeзou o trabalho, boa sorte!"30003);
      new 
name[MAX_PLAYER_NAME];
       
GetPlayerName(playeridnamesizeof(name));
       
format(stringsizeof(string), "%s agora estб fazendo a missгo Truck."name );
    
SendClientMessageToAll(Vermelhostring);
    return 
1;
    }
    
SendClientMessage(playeridVermelho,"Vocк tem que ser em um caminhгo para iniciar o trabalho");
    return 
1;
      } 
PHP код:
new Floatcheckpoints[5][4] =
{
  { 
2798.1702,-1576.2926,10.927210.0 },
  { 
2060.4375,-2091.2126,13.546910.0 },
  { 
070.8125,-2384.6160,13.546910.0 },
  { 
900.7358,-1204.0779,16.983210.0 },
  { 
800.1103,-1542.8258,13.552610.0 }
}; 
Galera coloquei esse codigo pra profissao de mecanico vc da /plixo ele mostra os check ,mais quando eu entro no checkpoint ele nгo desativa e manda pro outro , eu sei que й DisablePlayerCheckpoint, mais n sei como fazer.
Reply
#2

Verifica quando o player estiver encima do check point pode ser com IsPlayerInRangeOfPoint ai usa o DisablePlayerCheckpoint.
Reply
#3

Quote:
Originally Posted by WendeLKILL
Посмотреть сообщение
Verifica quando o player estiver encima do check point pode ser com IsPlayerInRangeOfPoint ai usa o DisablePlayerCheckpoint.
Para zoado esse sistema que vocк falou, Usa a base do CreateDynamicCp

PHP код:
CreateDynamicCP(Float:xFloat:yFloat:zFloat:sizeworldid = -1interiorid = -1playerid = -1Float:distance 100.0);
DestroyDynamicCP(checkpointid); 
PHP код:
new Checkpoint[2]; 
public 
OnPlayerSpawn(playerid)
{   
    
Checkpoint[0] = CreateDynamicCP(-2112.7422,-753.4459,32.17194, -1, -1, -1100); // Creates a checkpoint at -2112.7422,-753.4459,32.1719 with a range of 4, in any virtualworld, interior and for every player
    
Checkpoint[1] = CreateDynamicCP(-2112.9177,-760.9539,32.171945, -1, -1100); // Creates a checkpoint at -2112.9177,-760.9539,32.1719 with a range of 4, in virtualworld 5, any interior, and for every player
    
return 1;

Reply
#4

Bom Eu falei sem usar nenhuma include e etc.. claro que existem variais outras maneiras .
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)