"Pilot" infront of chat.
#1

Can someone help me I want "Pilot Radio" to show before the text.

Darkman33 Pilot Radio : Hey what sup.
Reply
#2

Use text draws.
Reply
#3

Quote:
Originally Posted by ¤Adas¤
Use text draws.
What do you mean? What is that.
(I'm a really nooby scripter.)
Reply
#4

Next time use the script request topic....
pawn Код:
if(!strcmp(cmdtext, "/pr", true, 3)) // /pr = pilot radio..
  {
    if(!cmdtext[3])return SendClientMessage(playerid, 0xFF0000FF, "USAGE: /pr [text]");
    new str[128];
    GetPlayerName(playerid, str, sizeof(str));
    format(str, sizeof(str), "* %s [Pilot Radio]: %s", str, cmdtext[4]);
    SendClientMessageToAll(0xFFA200AA, str);
    return 1;
  }
You will have to modify it to your own needs to check if the player is in an aircraft. Easily done though.

https://sampwiki.blast.hk/wiki/IsPlayerInVehicle
Reply
#5

Or...

just save the player's name in an temporary variable. Add "Pilot" infront the current player name, send the text you want with SendPlayerText (or some function like that), then reset the player's name to the temporary variable. The line that gets sent also include color difference (name=name color, text=white)

Leo
Reply
#6

Quote:
Originally Posted by kmzr
Next time use the script request topic....
pawn Код:
if(!strcmp(cmdtext, "/pr", true, 3)) // /pr = pilot radio..
  {
    if(!cmdtext[3])return SendClientMessage(playerid, 0xFF0000FF, "USAGE: /pr [text]");
    new str[128];
    GetPlayerName(playerid, str, sizeof(str));
    format(str, sizeof(str), "* %s [Pilot Radio]: %s", str, cmdtext[4]);
    SendClientMessageToAll(0xFFA200AA, str);
    return 1;
  }
You will have to modify it to your own needs to check if the player is in an aircraft. Easily done though.

https://sampwiki.blast.hk/wiki/IsPlayerInVehicle
Thanks.
Reply
#7

No problem
Reply
#8

Quote:
Originally Posted by PSPLeo
Or...

just save the player's name in an temporary variable. Add "Pilot" infront the current player name, send the text you want with SendPlayerText (or some function like that), then reset the player's name to the temporary variable. The line that gets sent also include color difference (name=name color, text=white)

Leo
Wow you really don't deserve your stars...
Reply
#9

Quote:
Originally Posted by mavtias
Quote:
Originally Posted by PSPLeo
[...]

Leo
Wow you really don't deserve your stars...
Why not? I was posting an idea on how the OP should code it. The stars are based on the post count.

Leo
Reply
#10

Quote:
Originally Posted by mavtias
Quote:
Originally Posted by PSPLeo
Or...

just save the player's name in an temporary variable. Add "Pilot" infront the current player name, send the text you want with SendPlayerText (or some function like that), then reset the player's name to the temporary variable. The line that gets sent also include color difference (name=name color, text=white)

Leo
Wow you really don't deserve your stars...
Agreed... not only does he not even know what SendClientMessage is, but he is stating that colors are done as (name=name color, text=white)... As any scripter would know, when using SendClientMessage, you cannot input multiple colors. the only way to make it so that the playername was colored is with a global chat and not using SendClientMessage... Those stars should be stripped, regardless of that post count.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)