Commands.
#1

Just one question, how could I make /paytoll, available in more than one location, using zcmd, like, I want to make some paytolls, but I don't understand the way to make is, so only one opens at a time, please can some one help?

Thank you.


If it helps, I have this, this is something else:

pawn Код:
command(pdgate, playerid, params[])
{
    #pragma unused params

    if(IsPlayerInRangeOfPoint(playerid, 4.0, 1214.19,300.26,19.98))
    {
        SetObjectRot(gate1, 1.68,26.76,71.03);
        SetObjectPos(gate1, 1214.19,300.26,19.901);
        SetTimer("close2", 5000, 0);
        SendClientMessage(playerid, RED, "Paramedic gate, is closing in 5 seconds.");
        return 1;
    }
    return 0;
}
Reply
#2

Код:
command(pdgate, playerid, params[])
{
    #pragma unused params

    if(IsPlayerInRangeOfPoint(playerid, 4.0, 1214.19,300.26,19.98))
    {
        SetObjectRot(gate1, 1.68,26.76,71.03);
        SetObjectPos(gate1, 1214.19,300.26,19.901);
        SetTimer("close2", 5000, 0);
        SendClientMessage(playerid, RED, "Paramedic gate, is closing in 5 seconds.");
        if(GetPlayerMoney(playerid) < 300) return SendClientMessage(playerid, COLOR_RED, "You have insufficient            funds!");
	GivePlayerMoney(playerid, - 300);
        return 1;

    }
    return 0;
}
Reply
#3

If I`m not wrong, this is what you mean:
pawn Код:
command(pdgate, playerid, params[])
{
    #pragma unused params

    if(IsPlayerInRangeOfPoint(playerid, 4.0, 1214.19,300.26,19.98))
    {
        SetObjectRot(gate1, 1.68,26.76,71.03);
        SetObjectPos(gate1, 1214.19,300.26,19.901);
        SetTimer("close2", 5000, 0);
        SendClientMessage(playerid, RED, "Paramedic gate, is closing in 5 seconds.");
        return 1;
    }
    if(IsPlayerInRangeOfPoint(playerid, 4.0, newx, newy, newz)) // newx, newy, newz - are the other gate coords.
    {
        //bla bla
        return 1;
    }
    return 1;
}
Oh and by the way, don`t use 'return 0;' in commands... use return 1; instead.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)