25.03.2010, 14:48
pawn Код:
Name(playerid)
{
new pname[MAX_PLAYER_NAME];
GetPlayerName(playerid, pname, MAX_PLAYER_NAME);
return pname;
}
pawn Код:
if(strcmp(Name(playerid), "Joe_", true))
{
//stuff
}
OR you can use an enum.
pawn Код:
enum stuff
{
name[MAX_PLAYER_NAME]
};
new st00f[MAX_PLAYERS][stuff];
public OnPlayerConnect(playerid)
{
new n[MAX_PLAYER_NAME]; GetPlayerName(playerid, n, MAX_PLAYER_NAME);
st00f[playerid][name] = n;
return 1;
}