REP+ if you help me - Printable Version
+- SA-MP Forums Archive (
https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (
https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (
https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: REP+ if you help me (
/showthread.php?tid=647687)
REP+ if you help me -
Filbert - 09.01.2018
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.
Re: REP+ if you help me -
DelK - 09.01.2018
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;
}
Re: REP+ if you help me -
JasonRiggs - 09.01.2018
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..
Re: REP+ if you help me -
Dayrion - 09.01.2018
« 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