[Ajuda] Nгo consigo compilar
#1

Nгo consigo compilar meu codigo alguem me ajuda por favor !!!
Код:
new Gate; // Lembrando que o nome que Colocar aqui serб Usado em TODO PROCESSO !
forward CloseGate(gateid); // Deixe QUETO ( Isso que farб com que o Portгo Feche )
#define COLOR_YELLOW 0xFFFF00AA
// Definindo COR - Amarelo !

public OnFilterScriptInit()
{
	Gate = CreateObject(980, 1721.4, -1721.8, 15.3, 0, 0, 0); // Coloque as Info do Portгo FECHADO Aqui =D (MODEL,X,Y,Z,ROTX,ROTY,ROTZ)

public OnPlayerCommandText
{
if (strcmp("/sc", cmdtext, true, 10) == 0) // Coloque o Comando que irб Abrir o Portгo ( Serб usado depois Tambйm )
    {
    if(IsPlayerInRangeOfPoint(playerid,7.0, 1721.4,-1721.8,15.3)) // Troque X,Y,Z Pelas Coordenadas do Portгo Fechado ! Troque 7.0 Pela Distancia que o Comando poderб ser Usado a Partir das Cood que vocк Colocou !
        {
            MoveObject(Gate,1732.9,-1721.8,15.3,3.0); // Troque X,Y,Z Pelas Coordenadas do Portгo Aberto ! 3.0 = Velocidade para ele se Mecher !
            SetTimerEx("CloseGate", 10000, false, "i", Gate); // Troque 10000 pelo que Tempo que vai Levar para o Portгo Fechar ( Lembrando que o TEMPO й em MS, ou seja, 10000 = 10 Segundos )!
            SendClientMessage(playerid, COLOR_YELLOW, "Portгo aberto :D em 10 segundos ira fechar"); // Coloque aqui a Mensagem que quer que Mande para o Player, EX: O Gate vai Facgar em 10 Segundos !
            return 1;
        }
    }
public CloseGate(gateid)
{
    if(gateid == Gate)
    {
        MoveObject(Gate,1721.4,-1721.8,15.3,3.0); // Troque X,Y,Z Pelas Coordenadas do Portгo FECHADO !
    }
return 1;
}
public OnPlayerKeyStateChange(playerid, newkeys, oldkeys)
{
    if ((newkeys==KEY_JUMP)) // Mude o KEY_JUMP pela o COD que Quiser, neste casso KEY_JUMP = Tecla ESPAЗO
    {
        OnPlayerCommandText(playerid,"/seucomando"); // O Comando que Estiver aqui deve Ser o Memso que vocк Colocou Anteriormente !
        // Adicione Outros Comandos para serem Executados com a Tecla ESPAЗO Aqui !
    }
return 0;
}
Reply
#2

Fiz desse jeito e funciono, indico usar zcmd e sscanf
PHP код:
CMD:abri(playeridparams[])
{
    if(
IsPlayerInRangeOfPoint(playerid,7.01721.4,-1721.8,15.3)) // Troque X,Y,Z Pelas Coordenadas do Portгo Fechado ! Troque 7.0 Pela Distancia que o Comando poderб ser Usado a Partir das Cood que vocк Colocou !
    
{
        
MoveObject(Gate,1732.9,-1721.8,15.3,3.0); // Troque X,Y,Z Pelas Coordenadas do Portгo Aberto ! 3.0 = Velocidade para ele se Mecher !
        
SetTimerEx("CloseGate"10000false"i",Gate); // Troque 10000 pelo que Tempo que vai Levar para o Portгo Fechar ( Lembrando que o TEMPO й em MS, ou seja, 10000 = 10 Segundos )!
        
SendClientMessage(playerid, -1"Portгo aberto :D em 10 segundos ira fechar"); // Coloque aqui a Mensagem que quer que Mande para o Player, EX: O Gate vai Facgar em 10 Segundos !
        
return 1;
    }
    return 
true;
}
forward CloseGate(gateid);
public 
CloseGate(gateid)
{
    if(
gateid == Gate)
    {
        
MoveObject(Gate,1721.4,-1721.8,15.3,3.0); // Troque X,Y,Z Pelas Coordenadas do Portгo FECHADO !
    
}
    return 
1;

'-'


Adpatado ->
PHP код:
public OnPlayerCommandText(playerid,cmdtext[])

    if(
strcmp("/abrir"cmdtexttrue10) == 0// Coloque o Comando que irб Abrir o Portгo ( Serб usado depois Tambйm ) 
    

        if(
IsPlayerInRangeOfPoint(playerid,7.01721.4,-1721.8,15.3)) // Troque X,Y,Z Pelas Coordenadas do Portгo Fechado ! Troque 7.0 Pela Distancia que o Comando poderб ser Usado a Partir das Cood que vocк Colocou ! 
        

            
MoveObject(Gate,1732.9,-1721.8,15.3,3.0); // Troque X,Y,Z Pelas Coordenadas do Portгo Aberto ! 3.0 = Velocidade para ele se Mecher ! 
            
SetTimerEx("CloseGate"10000false"i"Gate); // Troque 10000 pelo que Tempo que vai Levar para o Portгo Fechar ( Lembrando que o TEMPO й em MS, ou seja, 10000 = 10 Segundos )! 
            
SendClientMessage(playerid, -1"Portгo aberto :D em 10 segundos ira fechar"); // Coloque aqui a Mensagem que quer que Mande para o Player, EX: O Gate vai Facgar em 10 Segundos ! 
            
return true
        } 
    } 
    if(
strcmp("ir"cmdtexttrue10) == 0)
    {
        
SetPlayerPos(playerid1721.4,-1721.8,15.3);
        return 
true;
    }
    return 
true

forward CloseGate(gateid);
public 
CloseGate(gateid)
{
    if(
gateid == Gate)
    {
        
MoveObject(Gate,1721.4,-1721.8,15.3,3.0); // Troque X,Y,Z Pelas Coordenadas do Portгo FECHADO !
    
}
    return 
true;
}
public 
OnPlayerKeyStateChange(playeridnewkeysoldkeys)
{
    if((
newkeys == KEY_JUMP))
    {
        
OnPlayerCommandText(playerid"abrir");
    }
    return 
true;

Reply
#3

PHP код:
#include a_samp
new Gate// Lembrando que o nome que Colocar aqui serб Usado em TODO PROCESSO !
forward CloseGate(gateid); // Deixe QUETO ( Isso que farб com que o Portгo Feche )
#define COLOR_YELLOW 0xFFFF00AA
// Definindo COR - Amarelo !
public OnFilterScriptInit()
{
    
Gate CreateObject(9801721.4, -1721.815.3000); // Coloque as Info do Portгo FECHADO Aqui =D (MODEL,X,Y,Z,ROTX,ROTY,ROTZ)
    
return 1;
}
public 
OnPlayerCommandText(playerid,cmdtext[]){
    if(
strcmp("/sc"cmdtexttrue10) == 0// Coloque o Comando que irб Abrir o Portгo ( Serб usado depois Tambйm )
    
{
        if(
IsPlayerInRangeOfPoint(playerid,7.01721.4,-1721.8,15.3)) // Troque X,Y,Z Pelas Coordenadas do Portгo Fechado ! Troque 7.0 Pela Distancia que o Comando poderб ser Usado a Partir das Cood que vocк Colocou !
        
{
            
MoveObject(Gate,1732.9,-1721.8,15.3,3.0); // Troque X,Y,Z Pelas Coordenadas do Portгo Aberto ! 3.0 = Velocidade para ele se Mecher !
            
SetTimerEx("CloseGate"10000false"i"Gate); // Troque 10000 pelo que Tempo que vai Levar para o Portгo Fechar ( Lembrando que o TEMPO й em MS, ou seja, 10000 = 10 Segundos )!
            
SendClientMessage(playeridCOLOR_YELLOW"Portгo aberto :D em 10 segundos ira fechar"); // Coloque aqui a Mensagem que quer que Mande para o Player, EX: O Gate vai Facgar em 10 Segundos !
            
return 1;
        }
    }
    return 
false;
}
public 
CloseGate(gateid)
{
    if(
gateid == Gate)
    {
        
MoveObject(Gate,1721.4,-1721.8,15.3,3.0); // Troque X,Y,Z Pelas Coordenadas do Portгo FECHADO !
    
}
    return 
false;
}
public 
OnPlayerKeyStateChange(playeridnewkeysoldkeys)
{
    if ((
newkeys==KEY_JUMP)) // Mude o KEY_JUMP pela o COD que Quiser, neste casso KEY_JUMP = Tecla ESPAЗO
    
{
        
OnPlayerCommandText(playerid,"/seucomando"); // O Comando que Estiver aqui deve Ser o Memso que vocк Colocou Anteriormente !
        // Adicione Outros Comandos para serem Executados com a Tecla ESPAЗO Aqui !
    
}
    return 
0;

Reply
#4

Valeu !!! consegui compilar agora
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)