[HELP] player name id
#1

Hello I was kill myself and it supose to say Luca you killed by admin Luca but it says you killed by admin Luca I getting from this. What is wrong here

pawn Код:
RPName(id,name[0]);
        RPName(playerid,name[1]);
        SCMF(id,0xDB023EFF,"|A| %s you killed by admin %s",name[0],name[1]);
and here also a function RPName

pawn Код:
stock RPName(iPlayer,szPName[])
{
    static
    iUSPos;
    GetPlayerName(iPlayer,szPName,MAX_PLAYER_NAME);
    iUSPos = strfind(szPName,"_");
    strdel(szPName,iUSPos,(iUSPos + 1));
    strins(szPName,"_",iUSPos,MAX_PLAYER_NAME);
    return 1;
}
Reply
#2

What is the probleme ? What does the server tells you ? I didn't understand what you mean
Reply
#3

pawn Код:
RPName(playerid,name[0]);
        RPName(playerid,name[1]);
        SCMF(id,0xDB023EFF,"|A| %s was killed by admin %s",name[0],name[1]);
Reply
#4

pawn Код:
RemoveUnderScore(playerid)
{
    new namewithoutunderscorename[MAX_PLAYER_NAME];
    GetPlayerName(playerid,namewithoutunderscorename,sizeof(namewithoutunderscorename));
    for(new i = 0; i < MAX_PLAYER_NAME; i++)
    {
        if(namewithoutunderscorename[i] == '_') namewithoutunderscorename[i] = ' ';
    }
    return namewithoutunderscorename;
}
pawn Код:
SCMF(id, 0xDB023EFF,"|A| %s, you got killed by admin %s", RemoveUnderScore(id), RemoveUnderScore(playerid));
Reply
#5

The usage of MAX_PLAYER_NAME in a for-loop is rather non-sense in this case.
Reply
#6

I think that is maybe something wrong in funtion RPName beacuse till today was everything fine . thanks
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)