Optimize this code...
#1

Can i optimize this code?:

pawn Код:
stock SendMessage(playerid, phrase[])
{
    new Nom[MAX_PLAYER_NAME];
    new str[256], str2[256], phrase2[256];
    GetPlayerName(playerid, Nom, sizeof(Nom));
    if(strlen(phrase) > 70)
    {
         strmid(str2, phrase, 70, strlen(phrase));
         strmid(phrase2, phrase, 0, 70);
         format(str,sizeof(str),"%s dit : %s ..." ,Nom, phrase2);
         SendClientMessage(playerid, 0xFFFFFFFF,str);
         format(str,sizeof(str),"* ... %s" ,str2);
         SendClientMessage(playerid, 0xFFFFFFFF,str);
         return 1;
    }
    format(str,sizeof(str),"%s dit : %s" ,phrase, Nom);
    SendClientMessage(playerid, 0xFFFFFFFF,str);
    return 1;
}
Thx!
Reply


Messages In This Thread
Optimize this code... - by Baltimore - 15.11.2014, 17:58
Re: Optimize this code... - by sammp - 15.11.2014, 18:15
Re: Optimize this code... - by proSeryoga - 15.11.2014, 18:31
Re: Optimize this code... - by Kwarde - 15.11.2014, 19:45

Forum Jump:


Users browsing this thread: 1 Guest(s)