A delay between Sendclientmessage
#1

Hey, this is just for a tutorial i wanted to change up on my server, I've looked around and people keep telling me to use the settimer but no ones giving me an example, I'm fairly new to sa-mp and I'm trying to learn pawn but it's hard for me, since I've got an attention disorder, anyway could someone convert this for me?
Код:
 SendClientMessage(i, COLOR_YELLOW2, "*********Introduction*******");
                SendClientMessage(i, COLOR_GRAD1, "UniqueRP, is a roleplay server.");
			    SendClientMessage(i, COLOR_GRAD1, "UniqueRP was created to give you a better look at what the next generation of Roleplay will be, like.");
			    SendClientMessage(i, COLOR_ASKQ, "Roleplay is slowly becoming one of the most accurate game modes");
			    SendClientMessage(i, COLOR_LIGHTBLUE, "There is various varieties of factions to choose from");
			    SendClientMessage(i, COLOR_ASKQ, " Please Remember to check out the rules by typing /rules.");
			    SendClientMessage(i, COLOR_LIGHTBLUE, "The tutorial will proceed. ");
			    SendClientMessage(i, 0x00e6fbff, "Please Wait.");


 SendClientMessage(i, COLOR_YELLOW2, "*********Hacking & Abusing*******");
                SendClientMessage(i, COLOR_GRAD1, "Hacking is strictly forbidden here at UniqueRP.");
			    SendClientMessage(i, COLOR_GRAD1, "We have zero tolerance for it, if you get caught, you get banned.");
			    SendClientMessage(i, COLOR_ASKQ, "Abusing bugs is just as bad hacking.");
			    SendClientMessage(i, COLOR_LIGHTBLUE, "Instead of abusing bugs, just type /report and give a basic explanation of the bug, so that we can fix the bug for the future.");
			    SendClientMessage(i, COLOR_ASKQ, " Hacking and abusing will get you banned, permanently. ");



			    SendClientMessage(i, COLOR_LIGHTBLUE, "The tutorial will proceed. ");
			    SendClientMessage(i, 0x00e6fbff, "Please Wait.");
I need the timer between introduction and hacking & abusing, so that it shows introduction first for what ever time, then it switches to Hacking and abusing.

there's more to the tutorial but as long as i can get the basic timer code down I'm good for the rest.

any help is always appreciated and please don't spam and tell me to use the search button, that's so annoying.

Reply
#2

You can do every subject in a public,like;
pawn Код:
public introduction(playerid)
{
 SendClientMessage(i, COLOR_YELLOW2, "*********Introduction*******");
                SendClientMessage(i, COLOR_GRAD1, "UniqueRP, is a roleplay server.");
                SendClientMessage(i, COLOR_GRAD1, "UniqueRP was created to give you a better look at what the next generation of Roleplay will be, like.");
                SendClientMessage(i, COLOR_ASKQ, "Roleplay is slowly becoming one of the most accurate game modes");
                SendClientMessage(i, COLOR_LIGHTBLUE, "There is various varieties of factions to choose from");
                SendClientMessage(i, COLOR_ASKQ, " Please Remember to check out the rules by typing /rules.");
                SendClientMessage(i, COLOR_LIGHTBLUE, "The tutorial will proceed. ");
                SendClientMessage(i, 0x00e6fbff, "Please Wait.");
                // THE TIMER
                SetTimerEx("hackingabusing", 10000, false, "i", playerid);

}
Then another public at the buttom:
pawn Код:
public hackingabusing(playerid)
{
     SendClientMessage(i, COLOR_YELLOW2, "*********Hacking & Abusing*******");
                SendClientMessage(i, COLOR_GRAD1, "Hacking is strictly forbidden here at UniqueRP.");
                SendClientMessage(i, COLOR_GRAD1, "We have zero tolerance for it, if you get caught, you get banned.");
                SendClientMessage(i, COLOR_ASKQ, "Abusing bugs is just as bad hacking.");
                SendClientMessage(i, COLOR_LIGHTBLUE, "Instead of abusing bugs, just type /report and give a basic explanation of the bug, so that we can fix the bug for the future.");
                SendClientMessage(i, COLOR_ASKQ, " Hacking and abusing will get you banned, permanently. ");
// ANOTHER TIMER
SetTimerEx("SOMETHINGELSE", 10000, false, "i", playerid);

}
And it goes on and on.

btw,there are maybe 3 servers with the name unique-rp lol.
Reply
#3

Or you can do this

pawn Код:
#define MAX_STEPS 2 //This is the amount of messages you have
#define TUTORIAL_TIME 15 //Time per each step (in seconds)
forward Tutorial(playerid);
new pTutStep[MAX_PLAYERS];
public OnPlayerConnect(playerid)
{
  pTutStep[playerid]=0;
  return 1;
}
public Tutorial(playerid)
{
  if(!IsPlayerConnected(playerid))return; //In-case the player decides tutorials are for queers and quits
  switch(pTutStep[playerid])
  {
    case 0:
    {
      //Your first bit of messages
    }
    case 1:
    {
      //Your second bit of messages
    }
  }
  pTutStep[playerid]++;
  if(pTutStep[playerid]>MAX_STEPS)  //End Tutorial
  {
    //Set Player Up For Next Step (Spawning, Skin Selection, Etc.)
    pTutStep[playerid]=0;
    return;
  }
  SetTimerEx("Tutorial",TUTORIAL_TIME*1000,0,"i",playerid);
}
Reply
#4

Quote:
Originally Posted by Uniqueee
You can do every subject in a public,like;
pawn Код:
public introduction(playerid)
{
 SendClientMessage(i, COLOR_YELLOW2, "*********Introduction*******");
                SendClientMessage(i, COLOR_GRAD1, "UniqueRP, is a roleplay server.");
                SendClientMessage(i, COLOR_GRAD1, "UniqueRP was created to give you a better look at what the next generation of Roleplay will be, like.");
                SendClientMessage(i, COLOR_ASKQ, "Roleplay is slowly becoming one of the most accurate game modes");
                SendClientMessage(i, COLOR_LIGHTBLUE, "There is various varieties of factions to choose from");
                SendClientMessage(i, COLOR_ASKQ, " Please Remember to check out the rules by typing /rules.");
                SendClientMessage(i, COLOR_LIGHTBLUE, "The tutorial will proceed. ");
                SendClientMessage(i, 0x00e6fbff, "Please Wait.");
                // THE TIMER
                SetTimerEx("hackingabusing", 10000, false, "i", playerid);

}
Then another public at the buttom:
pawn Код:
public hackingabusing(playerid)
{
     SendClientMessage(i, COLOR_YELLOW2, "*********Hacking & Abusing*******");
                SendClientMessage(i, COLOR_GRAD1, "Hacking is strictly forbidden here at UniqueRP.");
                SendClientMessage(i, COLOR_GRAD1, "We have zero tolerance for it, if you get caught, you get banned.");
                SendClientMessage(i, COLOR_ASKQ, "Abusing bugs is just as bad hacking.");
                SendClientMessage(i, COLOR_LIGHTBLUE, "Instead of abusing bugs, just type /report and give a basic explanation of the bug, so that we can fix the bug for the future.");
                SendClientMessage(i, COLOR_ASKQ, " Hacking and abusing will get you banned, permanently. ");
// ANOTHER TIMER
SetTimerEx("SOMETHINGELSE", 10000, false, "i", playerid);

}
And it goes on and on.

btw,there are maybe 3 servers with the name unique-rp lol.
Thanks and yea there's only 1 well there was 2 and the other owner is changing their name so it's no biggy.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)