24.06.2011, 17:13
You dont need any record for that, just connect a npc with the npcidle.pwn (which is basically empty)
than just do what the other told you
pawn Код:
ConnectNPC("IDLER","npcidle");
pawn Код:
new idler; //not needed if you only got one npc
pawn Код:
//OnPlayerConnect
if(IsPlayerNPC(playerid)) {
new //or any kind of counter
name[MAX_PLAYER_NAME];
GetPlayerName(playerid, name, sizeof name);
if(strcmp(name, "IDLER", false) == 0) {
idler = playerid;
}
} else {
//code
}
return true;
pawn Код:
//OnPlayerSpawn
if(IsPlayerNPC(playerid)) {
if(playerid == idler) {
SetPlayerPos(playerid, 0.0, 0.0, 2.5);
}
} else {
//code
}
return true;