GetPlayerName and ID stock
#1

Can I make a stock that returns both the Name and ID of the player?
I made this but doesn't work ingame.
pawn Код:
stock GetPnameid()
{
    new pname[52],pid;
    GetPlayerName(pid, pname, sizeof(pname));
   
    return pname, pid;
}
Reply
#2

I don't think you can, but why not just making this?

pawn Код:
stock GetPnameid(pid)
{
    new pname[MAX_PLAYER_NAME];
    GetPlayerName(pid, pname, sizeof(pname));
    return pname;
}
Anyways, you will still need to have the good player id. With your stock, it will always return name of the player id 0.
Reply
#3

Alright, thanks.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)