how to do this ?
#1

guys i see on much servers like Crazy Bob, Los Santos Roleplay etc etc...

when you are in checkpoint it shows the textdraws and if you press JUST number ''1'' or ''2'' or ''3'' etc etc it will happen something there...

Example: Car Sale Textdraw

atm i dont have any Screen to show

---------------------------------------
CAR SALE

1.- Turismo
2.- Bullet
3.- Banshee
3.- Primo
4.- Blade
5.- Tampa

Press ''BLABLA'' for The Textdraw

----------------------------------------

so if player in checkpoint press just T or F6 and type in number ''1'' WITHOUT ''/'' Example/1) - this is wrong (1) - OK!

so if he press only number 1 he will get Turismo
if he press number ''2'' he will get Bulet
if he press number ''3'' he will get Banshee

how i can make command like this to type jsut nubmer without any ''/'' ?

Help please

TY!

i hope you can understand ty FOR HELP ITS VERY INPORTANT FOR ME
Reply
#2

OnPlayerText ?

And there are better ways to do that, such as menus, dialogs, ... or even menus made of textdraws.
Reply
#3

amm and can you just give a start of code or make for me mybe ?
Reply
#4

cmon any other help ?
Reply
#5

https://sampwiki.blast.hk/wiki/Creating_a_simple_Menu
Reply
#6

i dont want a menu guys -.- i know how to do a textdraw but i dont know how to make if player just press T or F6 and type in for example number ''1'' he will get a car .... dont post this wiki cuz i search there -.- , i want just if player press T and 1 there will something happen and player can type without ''/'' so it will looks like: player press T and 1 and he wil lget car or something , anyway ty for help
Reply
#7

OnPlayerText.
Reply
#8

aha ye i was searching there for OnPlayerText but there just write something for mute , cuz this is my first time to work with callback OnPlayerText i wondering if you can show me some part of code how to do this etc ... or someone please,ty for help
Reply
#9

Quote:
Originally Posted by Lajko1
aha ye i was searching there for OnPlayerText but there just write something for mute , cuz this is my first time to work with callback OnPlayerText i wondering if you can show me some part of code how to do this etc ... or someone please,ty for help
I really doubt you could create this, but you can have a go.
pawn Код:
if (strcmp(text, "1", true) == 0)
{
//effect
return false;
}
If the player types 1, you can call the 'effect'. "Abernethy: 1" won't apear either.
I do suggest you use a variable to check if they're in the menu;
pawn Код:
new bool:IsInCarMenu[MAX_PLAYERS] = false;
// You can use it this way.

if (IsInCarMenu[playerid] == true/* or false*/)

IsInCarMenu[playerid] = true/* or false*/;
It would now become something along the lines of this;
pawn Код:
if (strcmp(text, "1", true) == 0 && IsInCarMenu[playerid] = true)
{
/*effect
IsInCarMenu[playerid] = false;*/

return false;
}
Reply
#10

TYYYYYYYY SOOO MUCH
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)