10/04/2021 03:17 
	
	
	
		Textdraw Actions
Uma include simples que foi inspirada no FiveM que mostra uma pequena caixa de ação no centro da tela com as opções Y e N para o jogador escolher.
Download
https://github.com/dimmyi/td-actions
Preview:
Imagem: https://i.imgur.com/90W43SI.png
![[Imagem: 8VQLmcn.gif]](https://i.imgur.com/8VQLmcn.gif)
Exemplo de uso:
Responses:
	
	
	
Uma include simples que foi inspirada no FiveM que mostra uma pequena caixa de ação no centro da tela com as opções Y e N para o jogador escolher.
Download
https://github.com/dimmyi/td-actions
Preview:
Imagem: https://i.imgur.com/90W43SI.png
![[Imagem: 8VQLmcn.gif]](https://i.imgur.com/8VQLmcn.gif)
Exemplo de uso:
Código PHP:
#include <td-actions>
CMD:infernus(playerid)
{
    ShowActionForPlayer(playerid, ActionInfernus, "Voce realmente deseja spawnar um infernus neste local?", .action_time = 10000);
    return 1;
}
Action:ActionInfernus(playerid, response)
{
    if (response == ACTION_RESPONSE_YES)
    {
        new Float:x, Float:y, Float:z, Float:ang;
        GetPlayerPos(playerid, x, y, z);
        GetPlayerFacingAngle(playerid, ang);
        new vehicleid = CreateVehicle(411,
            x + 2.5 * floatsin(-ang, degrees),
            y + 2.5 * floatcos(-ang, degrees),
            z + 0.3,
            ang,
            0,
            0,
            -1);
        LinkVehicleToInterior(vehicleid, GetPlayerInterior(playerid));
        SetVehicleVirtualWorld(vehicleid, GetPlayerVirtualWorld(playerid));
    } else {
        SendClientMessage(playerid, -1, "Você não quis spawnar um infernus.");
    }
} 
Responses:
- ACTION_RESPONSE_NO_CHOOSE - Quando o jogador não escolher uma opção
 - ACTION_RESPONSE_NO - Quando o jogador aperta a tecla N
 - ACTION_RESPONSE_YES - Quando o jogador aperta a tecla Y
 

	   
	

 Dimmy#3917
	![[Imagem: deab0b7ad4a0cd6029a63547951d33b9b270fb4d...281_hq.gif]](https://pa1.narvii.com/7106/deab0b7ad4a0cd6029a63547951d33b9b270fb4dr1-500-281_hq.gif)