SA-MP Forums Archive
[HELP] player name id - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: [HELP] player name id (/showthread.php?tid=521250)



[HELP] player name id - Luca12 - 22.06.2014

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;
}



Re: [HELP] player name id - Clad - 22.06.2014

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


Re: [HELP] player name id - VladimirMark - 22.06.2014

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



Re: [HELP] player name id - SKAzini - 22.06.2014

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));



AW: [HELP] player name id - Campbell- - 22.06.2014

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


Re: [HELP] player name id - Luca12 - 22.06.2014

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