Rank in front of the player's name ?
#1

Hello, I try to do my first gamemode, since an hour and a half that I seek a script filter and I can not find it
It is to put the rank of a player before his nickname when he speaks (His rank depends on how many players he has killed).

Example: Private Mark: Hey
Sergeant Holley: Hi

I find filterscripts about ranks but no like this, thank you for helping me, I started and I have a little trouble

Sorry for my bad English.
Reply
#2

pawn Код:
public OnPlayerText(....)
{
      new string[128], name[MAX_PLAYER_NAME];
      GetPlayerName(playerid,name,128);
      format(string,128,"Rank %d %s: %s",Rank[playerid],name,text[0]);
      SendClientMessageToAll(COLOR,string);
      return 0;
}
Take this as an little example.
Reply
#3

Thank you very much for your quick reply
Reply
#4

I can not make it work, it gives me an error when compiling each time.
is what you can give me the entire code? please help me
Reply
#5

what is the error pleaze show us
Reply
#6

C:\Users\Hugo\Desktop\server\gamemodes\Untitled.pw n(91) : error 017: undefined symbol "Rank"
C:\Users\Hugo\Desktop\server\gamemodes\Untitled.pw n(91) : warning 215: expression has no effect
C:\Users\Hugo\Desktop\server\gamemodes\Untitled.pw n(91) : error 001: expected token: ";", but found "]"
C:\Users\Hugo\Desktop\server\gamemodes\Untitled.pw n(91) : error 029: invalid expression, assumed zero
C:\Users\Hugo\Desktop\server\gamemodes\Untitled.pw n(91) : fatal error 107: too many error messages on one line

I don't understand because I started making gamemode that for three days only
Reply
#7

pawn Код:
new Rank[ MAX_PLAYERS ];
At top of script.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)