SA-MP Forums Archive
Eh.. question - 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: Eh.. question (/showthread.php?tid=498912)



Eh.. question - Kyance - 05.03.2014

Could someone give me an example of how to create command like "/lastchat", or "/lastentered"?

I've tried creating a "lastentered", but i never really understood how to save stuff.
One of my friends tried explaining it to me, but I still didn't understand it D:


Re: Eh.. question - Clad - 05.03.2014

I dont know what u mean, more infos pls.


Re: Eh.. question - XK - 05.03.2014

Explain more,what do you want it to do


Re: Eh.. question - Kyance - 06.03.2014

Right, so

pawn Код:
CMD:lastdrivers(playerid, params[]) {
  //things that store it..?
  SendClientMessage(playerid, -1, "* Last drivers");
  //loop i guess?
  format(string, sizeof(string), "* %s[%d] || vID: %d", name, i/*d*/, vehicleid);
  SendClientMessage(playerid, -1, string);
  return 1;
}



Re: Eh.. question - Kyance - 06.03.2014

Figured it out by myself.


Re: Eh.. question - ConnorHunter - 06.03.2014

In curiosity, how did you do it in the end?


Re: Eh.. question - Kyance - 06.03.2014

Quote:
Originally Posted by ConnorHunter
Посмотреть сообщение
In curiosity, how did you do it in the end?
I figured out a way of using SetPVarInt and GetPVarInt to 'store' it, then created a /clearhistory to delete the spam, or just /deletehistoryevent [PlayerID] .