when it is weather text Double
#1

so I have public weather and the problem is when it's weather time then text is double if you know what I mean

example

Hello everyone today will me rainy

that is example and the problem is this



Hello everyone today will me rainy
Hello everyone today will me rainy


that is the problem text be double instead one. Thanks
Reply
#2

Use format instead of SendClientMessateToAll. The double text is not always like that. It will be doubled based on the users online in server. What I'm speaking about is:

pawn Код:
new string[256];

      format(string, 256, "Hello everyone. Today weather will be raining.");
      SendClientMessageToAll(0xFF0000FF, string);
Reply
#3

can asky one more thing i wonder how to make if I don't know if are the dark example on the server how to make to write hello everyone its's dark if you know what I mean or it's a day hello eveery one good day if you know what I mean.
Reply
#4

Using SetPlayerWeather, you can just random it and then, use cases.

pawn Код:
case 1:
{
      new string[256];

      SetPlayerWeather(playerid, 08);
      format(string, 256, "Hello everyone. There are some clouds in the sky.");
      SendClientMessageToAll(0xFF0000FF, string);
}
case 2:
{
      // etc like that
}
Look my Random Function thread to see how it works out.
Reply
#5

i have all of that but i need just when it's day then to write that it's day or is they a dark if the evening
Reply
#6

Then, do something like this:

pawn Код:
// In your 'OnGameModeInIt'

SetTimer("time", 1000, true);

// Somewhere in your script

forward time(playerid);
public time(playerid)
{
    new hour, minutes;
    GetPlayerTime(playerid, hour, minutes);
    if(hour == 12 && minutes == 01)
    {
         SendClientMessage(playerid, 0xFF0000FF, "Evening just started. Time is 12:01");
    }
    else if(hour == 00 && minutes == 01)
    {
         SendClientMessage(playerid, 0xFF0000FF, "Morning just started. Time is 00:01.");
    }
    return 1;
}
And so, although, change the 'SendClientMessage' to 'SendClientMessageToAll' and use the format I gave up.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)