}
if(strcmp(cmd, "/portaopspadm", true) == 0)
{
if(IsPlayerConnected(playerid))
{
if(IsPlayerInRangeOfPoint(playerid, 10.0, -1488, 2483.599609375, 54.400001525879))
{
if(PlayerInfo[playerid][pFaction] != 255 && PlayerInfo[playerid][pFaction] == 0)
{
if (PortaoAbertoPSPADM == 0)
{
MoveDynamicObject(portaoPSPADM, -1488, 2492.4995117188, 54.400001525879 ,2.0); // no X Y Z coloque as coords dele aberto // 2.0 e a velocidade q ele abre nao mude
PlayerActionMessage(playerid,15.0,"utiliza o comando para abrir o portгo.");
PortaoAbertoPSPADM = 1;
}
else if (PortaoAbertoPSPADM == 1)
{
MoveDynamicObject(portaoPSPADM, -1488, 2483.599609375, 54.400001525879 ,2.0); // no X Y Z coloque as coords dele aberto // 2.0 e a velocidade q ele abre nao mude
PlayerActionMessage(playerid,15.0,"utiliza o comando para fechar o portгo.");
PortaoAbertoPSPADM = 0;
}
else
{
SendClientMessage(playerid, COLOR_LIGHTYELLOW2, "Nгo йs da Polнcia!");
}
}
}
}
return 1;
#include <a_samp>
new Portaopspadm;
new PlayerIspolicial[MAX_PLAYERS]; //colocar em 1 se a polнcia
#define Vermelho 0xFF0000AA
#define Amarelo 0xFFFF00AA
public OnFilterScriptInit()
{
Portaopspadm = CreateObject(976, -1488, 2483.599609375, 54.400001525879, 0, 0, 272);
return 1;
}
public OnPlayerCommandText(playerid, cmdtext[])
{
//----------------------------
if (strcmp("/abrirpsp", cmdtext, true, 10) == 0)
{
if( PlayerIspolicial[playerid] == 1 )
{
MoveObject(Portaopspadm, -1488, 2492.4995117188, 54.400001525879, 4.0);
SendClientMessage(playerid, Amarelo, "[INFO]Portгo estб abrindo..");
return 1;
}
}
//----------------------------
if (strcmp("/fecharpsp", cmdtext, true, 10) == 0)
{
if( PlayerIspolicial[playerid] == 1 )
{
MoveObject(Portaopspadm, -1488, 2483.599609375, 54.400001525879, 4.0);
SendClientMessage(playerid, Amarelo, "[INFO]Portгo estб fechando..");
return 1;
}
}
return 0;
}
O que poderб ser ? |
Obrigado a vocкs, mas ao compilar deu certinho na hora de eu executar o comando no server ele dб aquela mensagem de comando invalido
O que poderб ser ? Obrigado! |
forward PortaopspadmAndando();
public PortaopspadmAndando()
{
MoveObject(Portaopspadm,CordenadasDoPortaoFechado);
return true;
}

}
if(strcmp(cmd, "/portaopspadm", true) == 0)
{
if(IsPlayerConnected(playerid))
{
if(IsPlayerInRangeOfPoint(playerid, 10.0, -1488, 2483.599609375, 54.400001525879))
{
if(PlayerInfo[playerid][pFaction] != 255 && PlayerInfo[playerid][pFaction] == 0)
{
if (PortaoAbertoPSPADM == 0)
{
MoveDynamicObject(portaoPSPADM, -1488, 2492.4995117188, 54.400001525879 ,2.0); // no X Y Z coloque as coords dele aberto // 2.0 e a velocidade q ele abre nao mude
PlayerActionMessage(playerid,15.0,"utiliza o comando para abrir o portгo.");
PortaoAbertoPSPADM = 1;
}
else if (PortaoAbertoPSPADM == 1)
{
MoveDynamicObject(portaoPSPADM, -1488, 2483.599609375, 54.400001525879 ,2.0); // no X Y Z coloque as coords dele aberto // 2.0 e a velocidade q ele abre nao mude
PlayerActionMessage(playerid,15.0,"utiliza o comando para fechar o portгo.");
PortaoAbertoPSPADM = 0;
}
else
{
SendClientMessage(playerid, COLOR_LIGHTYELLOW2, "Nгo йs da Polнcia!");
}
}
}
}
return 1;