Search

open.mp forum

RegisterLogin

Discussion

General
Chat
Tech
Life
Art
Programming
open.mp
Development Updates
Questions and Suggestions
SA-MP
General Discussions
Videos and Screenshots
Support
Pawn Scripting
Tutorials
Releases
Plugins
Libraries
Filterscripts
Gamemodes
Maps
Advertisements
Other languages
Spanish/Espa?ol
Programaci?n
Discusi?n GTA SA Multijugador
Mods
Offtopic
Juegos
Portuguese/Portugu?s
Russian/???????
Italian/Italiano
Dutch/Nederlands
German/Deutsch
Romanian/Rom?na
Ex-Yu
Polish/Polski
Og?lne
Serwery
Skryptowanie
Filmiki i zdjecia
Lithuanian/Lietuvi?kas
French/Fran?ais
Hungarian/Magyar
Hindi/Urdu
Turkish
Other
Internal
Team
Hidden
Archived

Library

 Collections Links Members Roles

Textdraw Actions

Textdraw Actions

ID
d6ouivnilegovhg7bq4g
author
fort's avatar

ForT

@fort


View profile
Copy link
  Report member
started
Apr 10, 2021
replies
0
participating
No

scroll to top

powered by storyden

Login
Discussion
Libraries
Textdraw Actions
fort's avatar

ForT

@fort


View profile
Copy link
  Report member
• 5y
Libraries

Textdraw Actions

library

Textdraw Actions



A simple include that shows a small action box in the center of the screen with options Y and N for the player to choose.



Download

https://github.com/dimmyi/td-actions



Preview:

Image: https://i.imgur.com/90W43SI.png





Usage:



#include <td-actions>



CMD:infernus(playerid)

{

? ? ShowActionForPlayer(playerid, ActionInfernus, "Do you really want to spawn a infernus in this position?", .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, "You didn't want to spawn a infernus.");

? ? }

}





Responses:



  1. ACTION_RESPONSE_NO_CHOOSE - When the player does not choose an option

  2. ACTION_RESPONSE_NO -?When the player presses the N key

  3. ACTION_RESPONSE_YES -?When the player presses the Y?key

0 likes0 replies

    Please sign up or log in to reply