Ingame Object Searching (Textdraws) -
Dignity - 19.06.2014
For all those who asked, here it is. This allows you to /search [query] ingame and it'll return objects which you can spawn. It's basically an ingame search engine like
gta-sa-mp.de and/or MTA.
Include libraries you'll need:
- mSelection (By d0):
thread
- oarray (By Pottus):
pastebin
- zcmd (By Zeex):
thread
Note (installation/proper mSelection config):
In order for the mSelection menu to show pages, you need to change the "mS_CUSTOM_MAX_ITEMS" value to MAX_OBJECTS. Not doing this will return constant console warnings about an invalid array size (seeing our object list exceeds the default one) and will only show you one page with 19 objects.
Credits: Pottus,
TakeiT,
Memoryz
Ingame picture:
pawn Код:
#include <a_samp>
#include <mSelection>
#include <oarray>
#include <zcmd>
#define SEARCH_MENU 1
CMD:search(playerid, params[])
{
new items, arrSearch[125];
if (isnull(params)) return SendClientMessage(playerid, -1, "/search [params]");
for(new i; i < sizeof(ObjectList) && items < sizeof(arrSearch); i ++)
{
if(strfind(ObjectList[i][oName], params, true) != -1)
{
arrSearch[items ++] = ObjectList[i][oID];
}
}
ShowModelSelectionMenuEx(playerid, arrSearch, items, "Search Results", SEARCH_MENU, 0.0, 0.0, 90.0);
return true;
}
public OnPlayerModelSelectionEx(playerid, response, extraid, modelid)
{
if(extraid == SEARCH_MENU)
{
if(response)
{
new Float:X, Float:Y, Float:Z, sel;
GetPlayerPos(playerid, X, Y, Z);
sel = CreateObject(modelid, X +1, Y, Z, 0.00, 0.00, 0.00);
EditObject(playerid, sel);
return true;
}
}
return true;
}
Re: Ingame Object Searching (Textdraws) -
CaptainDarkHarpy - 19.06.2014
That's pretty fucking cool, I'll admit.
Re: Ingame Object Searching (Textdraws) - Astralis - 19.06.2014
Awesome stuff!
Re: Ingame Object Searching (Textdraws) -
TakeiT - 19.06.2014
This was made for a map editor, but'll work good for a quick events thing for a roleplay server.
Re: Ingame Object Searching (Textdraws) -
Jarv - 19.06.2014
This is awesome!
Great work!
Re: Ingame Object Searching (Textdraws) -
Nourdin - 19.06.2014
Nice work
Re: Ingame Object Searching (Textdraws) -
extror3 - 19.06.2014
That's cool! Great job!
Re: Ingame Object Searching (Textdraws) -
AroseKhanNiazi - 20.06.2014
undefined symbol "ShowModelSelectionMenuEx"
and i got the inc
Re: Ingame Object Searching (Textdraws) -
Dignity - 21.06.2014
Quote:
Originally Posted by AroseKhanNaizi
undefined symbol "ShowModelSelectionMenuEx"
and i got the inc
|
If you have the include, it should work. Are you sure you have the latest version? (
https://sampforum.blast.hk/showthread.php?tid=520621)
Re: Ingame Object Searching (Textdraws) -
PowerF - 21.06.2014
Cool!
Re: Ingame Object Searching (Textdraws) -
PowerF - 21.06.2014
What is this? O_O where i download it?
Sorry For Double Post.
Re: Ingame Object Searching (Textdraws) -
AroseKhanNiazi - 21.06.2014
Quote:
Originally Posted by PowerF
What is this? O_O where i download it?
Sorry For Double Post.
|
he provided paste bin link use it copy and make an file
sorry solved