[FilterScript] MRSH rank system with prefix
#3

You could make this a lot less lines of code

pawn Код:
new string[175];

    if((GetPlayerScore(playerid) >= 0) && (GetPlayerScore(playerid) <= 100)) format(string,sizeof(string), "{F5E618}[Corporal]{FFFFFF} %s: {FFFFFF}%s",GetName(playerid),text);
    else if((GetPlayerScore(playerid) >= 100) && (GetPlayerScore(playerid) <= 300)) format(string,sizeof(string), "{F5E618}[Lieutenant]{FFFFFF} %s: {FFFFFF}%s",GetName(playerid),text);
    .....
   
    SendClientMessageToAll(-1, string);
    return 0;
Why bother checking if the player is connected obviously they are if they just typed the message.

pawn Код:
stock GetName(playerid)
{
    new Name[MAX_PLAYER_NAME];
    GetPlayerName(playerid, Name, sizeof(Name));
    return Name;
}
Reply


Messages In This Thread
MRSH: ShRank System [with prefix] - by mrsh - 10.03.2014, 16:09
Re: MRSH rank system with prefix - by Hax0rm - 10.03.2014, 16:42
Re: MRSH rank system with prefix - by Pottus - 10.03.2014, 17:34
Re: MRSH rank system with prefix - by mrsh - 14.03.2014, 11:47
Re: MRSH rank system with prefix - by amirab - 15.03.2014, 08:32
Re: MRSH rank system with prefix - by mrsh - 15.03.2014, 10:39

Forum Jump:


Users browsing this thread: 2 Guest(s)