Como criar um potгo que abre com buzina
#1

O Portгo eu sei fazer, o problema й q eu queria abrir com buzina, alguem sabe
Reply
#2

to com o mesmo probleminha
Reply
#3

pawn Код:
public OnPlayerKeyStateChange
{
   if(IsPlayerInRangeOfPoint(...))
   {
      if ((newkeys & KEY_FIRE ) && !(oldkeys & KEY_FIRE ))
      {
        MoveObject (...);
      }
   }
}
Sу tens й que susbstituir o KEY_FIRE pela key da buzina, que nгo sei qual й.
Reply
#4

Quote:
Originally Posted by Ritz
Sу tens й que susbstituir o KEY_FIRE pela key da buzina, que nгo sei qual й.
KEY_HORN й a tecla da buzina
Reply
#5

Cara tenta assim

no comeзo do gamemode

#define KEY_HORN2

public OnPlayerKeyStateChange(playerid,newkeys,oldkeys)
{
if((newkeys == KEY_HORN) && (IsPlayerInAnyVehicle(playerid)))
{
if (PlayerInfo[playerid][pMembro] == 10 || PlayerInfo[playerid][pLider] == 10)
{
OnPlayerCommandText(playerid,"/ptaxi - AQUI Й O COMANDO DE ABRIR O PORTAO MANUALMENTE");
}
}
return 0;
}
Reply
#6

Quote:
Originally Posted by Rafael_Nerd
Cara tenta assim

no comeзo do gamemode

#define KEY_HORN2

public OnPlayerKeyStateChange(playerid,newkeys,oldkeys)
{
if((newkeys == KEY_HORN) && (IsPlayerInAnyVehicle(playerid)))
{
if (PlayerInfo[playerid][pMembro] == 10 || PlayerInfo[playerid][pLider] == 10)
{
OnPlayerCommandText(playerid,"/ptaxi - AQUI Й O COMANDO DE ABRIR O PORTAO MANUALMENTE");
}
}
return 0;
}
Lol? Isso funca Rafael_Nerd?
Reply
#7

Quote:
Originally Posted by Ritz
pawn Код:
public OnPlayerKeyStateChange
{
   if(IsPlayerInRangeOfPoint(...))
   {
      if ((newkeys & KEY_FIRE ) && !(oldkeys & KEY_FIRE ))
      {
        MoveObject (...);
      }
   }
}
Sу tens й que susbstituir o KEY_FIRE pela key da buzina, que nгo sei qual й.
Testei isso...mas quando eu abro o portao , ele abre o portao normalmente mas fala q "n existe esse comando no server"...
''/
Reply
#8

Quote:

Lol? Isso funca Rafael_Nerd?

e so trocar o
return 0;
}
para
return 1;
}
Reply
#9

Lб em cima
#define KEY_HORN 2

Public:
public OnPlayerKeyStateChange(playerid,newkeys,oldkeys)
{ if((newkeys == KEY_HORN) && (IsPlayerInAnyVehicle(playerid))) //abre em qualquer carro
{
if(gTeam[playerid] == 2 || IsACop(playerid) || IsAPre(playerid)) // quem pode abrir o portгo (Militares e Governo jб colocados)
{
OnPlayerCommandText(playerid,"/comandodeabrirportгo"); //comando de abrir o portгo. Ex: /pp
}
}
return 0;
}
Reply
#10

Nгo precisa jб descubri com o meu amigo Kewen
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)