Jump to content
  • 0

Ajutor please:((


LuckY

Question

Am facut un script pentru poarti si in pawn numi da vreo erroare sau warning.In joc cand o folosesc imi da unknown command.Ma poate ajuta cineva.

#include <a_samp>
#include <zcmd>

new gate1;

public OnGameModeInit()

{
    gate1 = CreateObject(969,1392.80004883,1183.69995117,9.69999981,0.00000000,0.00000000,0.00000000, 20.0); //Creating the object
    return 1;
}
public OnPlayerCommandText(playerid, cmdtext[])
{
//opening bracket
    if (strcmp("/open", cmdtext, true, 5) == 0) // The /open command
    {//opening bracket
    if(IsPlayerInRangeOfPoint(playerid, 20, 1392.80004883, 1183.69995117, 4.69999981))//Checking if the player in the range of the gate
        {//opening bracket
        MoveObject(gate1, 1392.80004883, 1183.69995117, 9.69999981, 10);// Opening the gate
        SendClientMessage(playerid, 0xEF994300, "The gate has opened."); //Sending a message that gate opened
        }//closing bracket
    return 1;
    }//closing bracket
    if (strcmp("/close", cmdtext, true, 6) == 0)// The /close command
    {//opening bracket
    if(IsPlayerInRangeOfPoint(playerid, 20, 1392.80004883, 1183.69995117, 9.69999981))//Checking if the player in the range of the gate
        {//opening bracket
    MoveObject(gate1, 1392.80004883, 1183.69995117, 9.69999981, 10);// Moving the gate
	SendClientMessage(playerid, 0xEF994300, "The gate has closed.");//Sending a message to the one used the command
                }//closing bracket
	return 1;
    }//closing bracket
    return 0;
//closing bracket
}

Link to comment
Share on other sites

2 answers to this question

Recommended Posts

Pentru ca ai pus sus

#include <ZCMD>

ia pune asa

#include <a_samp>
#include <zcmd>

new gate1;

public OnGameModeInit()

{
    gate1 = CreateObject(969,1392.80004883,1183.69995117,9.69999981,0.00000000,0.00000000,0.00000000, 20.0); //Creating the object
    return 1;
}
CMD:open(playerid,params[])
    {//opening bracket
    if(IsPlayerInRangeOfPoint(playerid, 20, 1392.80004883, 1183.69995117, 4.69999981))//Checking if the player in the range of the gate
        {//opening bracket
        MoveObject(gate1, 1392.80004883, 1183.69995117, 9.69999981, 10);// Opening the gate
        SendClientMessage(playerid, 0xEF994300, "The gate has opened."); //Sending a message that gate opened
        }//closing bracket
    return 1;
    }//closing bracket
    CMD:close(playerid,params[])
    {//opening bracket
    if(IsPlayerInRangeOfPoint(playerid, 20, 1392.80004883, 1183.69995117, 9.69999981))//Checking if the player in the range of the gate
        {//opening bracket
    MoveObject(gate1, 1392.80004883, 1183.69995117, 9.69999981, 10);// Moving the gate
	SendClientMessage(playerid, 0xEF994300, "The gate has closed.");//Sending a message to the one used the command
                }//closing bracket
	return 1;
    }//closing bracket

Massari e curva mea

Link to comment
Share on other sites

Guest
This topic is now closed to further replies.
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue. For more details you can also review our Terms of Use and Privacy Policy.