SA-MP Forums Archive
[Duda]Yom_Buttons - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: Non-English (https://sampforum.blast.hk/forumdisplay.php?fid=9)
+--- Forum: Languages (https://sampforum.blast.hk/forumdisplay.php?fid=33)
+---- Forum: Español/Spanish (https://sampforum.blast.hk/forumdisplay.php?fid=29)
+---- Thread: [Duda]Yom_Buttons (/showthread.php?tid=490544)



[Duda]Yom_Buttons - Fornew - 27.01.2014

Hola, como el GM de ZenonCity, tiene este include, pero, quiero saber la funciуn de "CreateButton(playerid, ....); , gracias.


Respuesta: [Duda]Yom_Buttons - Zume - 27.01.2014

Mira este ejemplo.

Quote:
Originally Posted by Southclaw
pawn Код:
new btn_GateActivate;

public OnGameModeInit()
{
    btn_GateActivate = CreateButton(-174.3534, 2375.4634, 46.2856, "Press ~k~~VEHICLE_ENTER_EXIT~ open the gate");
}


public OnButtonPress(playerid, buttonid)
{
    if(buttonid == btn_GateActivate)
    {
        MoveDynamicObject(GateObject, -184.2654, 2373.3563, 51.3534);
        SendClientMessage(playerid, 0xFFBBCCFF, "Gate Open!");
    }
}
Bбsicamente las coordenadas de ahн son para el objeto, de ahн se crea un radio.


Respuesta: [Duda]Yom_Buttons - Fornew - 27.01.2014

No porfavor, no entiendo cual es la funciуn.їSera las coordenadas del movimiento?.


Respuesta: [Duda]Yom_Buttons - Zume - 27.01.2014

Me parece que esto crea una zona en la que si presionas F o ENTER se ejecutarб lo de OnBottonPress, dependiendo lo que le asignes tъ.