REP+ if you help me
#1

Guys, i need /searchcar or /vsearch command in satdmv9.
Example when i type '/searchcar inf', it will give me the list of infernus that be bought, infernus that for sell, the ID of infernus, and people who own the infernus(In Dialog).
REP+
Sorry for my bad English.
Reply
#2

Well, from what I understand in the list of players that have the infernus, I'll give you a hint you can do the following: declare a variable playerdata [playerid] [pInfernus] and when the player buys an infernus you put playerdata [playerid ] [pinfernus] = 1; it will be easier to make the list of who has infernus on the server. list below:
Код:
CMD:search(playerid, params[])
{
	new car[15], String[128];
	if(sscanf(params, "s[15]", car)) return SendClientMessage(playerid, -1, "USE: /search [car]");
	if(strcmp(params, "inf", true))
	{
		for(new i = 0; i < MAX_PLAYERS; i++)
		{
		    if(pData[i][pInfernus] > 0)
		    {
		    	format(String, sizeof(String), "%s\n", GetName(i));
		    	ShowPlayerDialog(playerid, 9999, DIALOG_STYLE_MSGBOX, "Infernus", String, "Botton", "Botton1");
			}
		}
	}
	return 1;
}

GetName(playerid)
{
	new aname[MAX_PLAYER_NAME];
 	GetPlayerName(playerid, aname, sizeof(aname));
	return aname;
}
Reply
#3

You shouldn't just come down here taking the idea of another server and asking us to create a command or a system for you, You must spend effort, try to create it, and come back if you had a problem..
Reply
#4

« Would help if you handed out some code to aid in making this command, but you know, Scripting Help isn't really for making you a command...
But if someone was going to be kind, then they'd need some basis to go on, rather than nothing and guess everything. » - Sew_Sumi
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)