Is it possible to do this?
#1

Hello,

Ok so on a website, Like say if there was a search bar.

It would be a box. But in it it would say something like: Type in here what yu want to search for

Is it possible to do that with input dialogs? Like put some text in that the player takes out and replaces with whatever?
Reply
#2

if you mean something like "quickstrings", then: yes.
this example cuts out a "#mon", and replaces it with your actual amount of cash
Код:
public OnPlayerCommandText(playerid, cmdtext[])
{
	new name[MAX_PLAYER_NAME];
	GetPlayerName(playerid,name,sizeof(name));
	new string1[128],string2[128],result[128];
	new found;
	found=strfind(cmdtext[0],"#mon",true);
	if(found>-1)
	{
		strmid(string1,cmdtext,0,found);
		strmid(string2,cmdtext,found+4,128);
		format(result,sizeof(result),"%s%d%s",string1,GetPlayerMoney(playerid),string2);
		SetPlayerChatBubble(playerid,result,CHAT_CIV_COLOR[GetPVarInt(playerid,"WantedLevel")],100.0,10000);
		SendClientMessageToAll(CHAT_CIV_COLOR[GetPVarInt(playerid,"WantedLevel")],result);
	}
//......
iam too lazy to cut out the not-needed parts atm ^^
Reply
#3

No not that.

If i made a input dialog.

Lets say. I put in: Hello im joe
Is it possible to make it put that in a certain dialog without typing anything
Reply
#4

ah you mean a "default" string. like when you /deposit, then a dialog with f.ex "10000" already typed in would pop up...
iam searching for a solution for this too.
imo this could be included in next samp version. we all could take usage of this :P
edit: this feature would make sending (saved) messages easy aswell. like a predefined string "Babul is selling max prized weps @ $loc", so that string set as default after typing /pm <id> would speed up gameplay a lot
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)