One 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: One question (
/showthread.php?tid=309404)
One question -
Setkus - 07.01.2012
Hi, guys!
I have one question for you. Well, I want that every two minutes the message says "If you want to get a driving license, you should to go to the teachers (teacher name)" or something like that. All I want is how to do that in teacher name it says player name which works in driving school? I hope you understand me. Thanks, anyway. Sorry for my bad english, i'm Lithuanian.
Re : One question -
rbcrp - 07.01.2012
So you want you're server to say a random message every two minutes saying "If you want a driving license, you should go see driving teacher (name)." ?
You would have to create a 2 minute timer that keeps repeating.
Код:
forward TwoMinutePublic();
Код:
new stock TwoMinuteTimer();
Код:
public TwoMinutePublic()
{
new id;
SendClientMessageToAll(WHITE, "If you want to get a driving license, visit driving teacher (name)");
return 1;
}
Код:
public OnGameModeInit()
{
TwoMinuteTimer = SetTimer("TwoMinutePublic", 120000, true);
return 1;
}
I dont really know if this helps you much because i dont really know what you're trying to ask, hopefully i helped you. If you have any questions please PM me and i can most likely help you with any scripting issues you might have. Have a nice day (;
Re: One question -
Setkus - 07.01.2012
Ok, thanks, but For example in game my name is Jack_Delson and I am a teacher. And here is the message: "If you want a driving license, you should go see driving teacher (my name (Jack_Delson or other teacher name)." So how to do that in "name" should show my name or other teacher name? Thanks for any advice
Re : One question -
rbcrp - 08.01.2012
To make it you're name just change the thing in the filterscript from this
Код:
SendClientMessageToAll(WHITE, "If you want to get a driving license, visit driving teacher (name)");
to this
Код:
SendClientMessageToAll(WHITE, "If you want to get a driving license, visit the driving teacher Jack_Delson");
If this is not what you;re looking for please try to give a little more information on what you need. I have every intention of getting you to you're point of interest.
AW: One question -
BigETI - 08.01.2012
Loop through all player who are set to driving license teacher and just include their names in the SendClientMessage function. (There should be a variable which shows who are driving license teacher or not)