[Include] [G]KeyPad (Textdraw)
#1

[G]KeyPad
Hi guys,
Today i made include called [G]KeyPad


Function
BUTTONS
0-9 to add number
Ok to response
Del to remove numer
X to close [G]Keypad

SHOW
pawn Code:
native ShowGKeyPad(playerid,keypadid,match,selectcolor = -1);
Description:
Display [G]KeyPad for player

Parameters:
pawn Code:
(playerid,keypadid,match,selectcolor)
playerid - The ID of the player to display the [G]KeyPad
keypadid - An ID to assign this [G]KeyPad to, so responses can be processed.
match - An value of keypad. ( check if player input value success)
selectcolor - Color Select textdraw ( default White)
HIDE
pawn Code:
native HideGKeyPad(playerid);
Description:
Hide [G]KeyPad for player.
Parameters:
pawn Code:
(playerid)
playerid - The ID of the player to display the [G]KeyPad
Callback
pawn Code:
public OnPlayerEnterGKeyPad(playerid,success,keypadid,value,match)
Description:
This callback is called when a player click button 'Ok' on [G]KeyPad

Parameters:
pawn Code:
(playerid,success,keypadid,value,match)
playerid - The ID of the player that enter to the [G]KeyPad
success - 0 is wrong and 1 is correct
keypadid - The ID of the [G]Keypad the player enter to, assigned in ShowGKeyPad
value - Is Value of player input
match - Is Value of Keypadid
IMAGES


EXAMPLE
Code:
#define FILTERSCRIPT

#include <a_samp>
#include <gkeypad>
#include <zcmd>
CMD:gkeypad(playerid,params[])
{
	ShowGKeyPad(playerid,1,123456,-1);
	return 1;
}
CMD:cursor(playerid,params[])
{
	if(IsGKeyPadOpened(playerid) == 1) SelectTextDraw(playerid,-1);
	else SendClientMessage(playerid,-1,"GKeypad no opened");
	return 1;
}
public OnPlayerEnterGKeyPad(playerid,success,keypadid,value,match)
{
	new str[128];
	format(str,sizeof(str),"%d , id : %d,value %d match %d",success,keypadid,value,match);
	SendClientMessage(playerid,-1,str);
	return 1;
}
DOWNLOAD
https://github.com/gasmanvnn/SA-MP/b...ts/gkeypad.inc
CREDITS
Specical thank Southclaw's for Example Functions.
Gasman for script.
ZeeX for Zcmd (Example)
Reply


Messages In This Thread
[G]KeyPad (Textdraw) - by Gasman - 22.08.2015, 15:28
Re: [G]KeyPad (Textdraw) - by Variable™ - 22.08.2015, 15:31
Re: [G]KeyPad (Textdraw) - by Michael B - 22.08.2015, 15:32
Re: [G]KeyPad (Textdraw) - by Crayder - 22.08.2015, 15:33
Re: [G]KeyPad (Textdraw) - by Gasman - 22.08.2015, 16:05
Re: [G]KeyPad (Textdraw) - by kristo - 22.08.2015, 19:01
Re: [G]KeyPad (Textdraw) - by Crayder - 22.08.2015, 19:14
Re: [G]KeyPad (Textdraw) - by Pottus - 22.08.2015, 19:41

Forum Jump:


Users browsing this thread: 1 Guest(s)