18.04.2012, 13:48
(
Последний раз редактировалось Slice; 14.05.2012 в 08:13.
)
Why won't this very simple NPC code work? (0.3d R2)
Edit: It seems that GetPlayerName doesn't work until OnNPCSpawn.
pawn Код:
#include <a_npc>
main () {
}
public OnNPCConnect(myplayerid) {
new buf[64];
GetPlayerName(myplayerid, buf, sizeof(buf));
format(buf, sizeof(buf), "I am %s (%d).", buf, myplayerid);
SendChat(buf);
// Output: Output: "I am (0)."
}