13.10.2009, 18:35
I discovered wich the problem is the Bot(Npc) will insert a second. If you used first a bot out of an interior, the second bug, spawn and tend go to the first Bot continuously. This is my script
Код:
public SetPlayerSpawn(playerid) { if(IsPlayerConnected(playerid)) { if(IsPlayerNPC(playerid)) //Samp (0.3) { new npcname[MAX_PLAYER_NAME]; GetPlayerName(playerid, npcname, sizeof(npcname)); if(!strcmp(npcname, "Bot2", true)) { // Out of Interior (Not Bug as frist) PlayerInfo[playerid][pNpcBot] = 1; SetPlayerSkin(playerid, 71); return 1; } if(!strcmp(npcname, "Bot3", true)) { // In Interior, Bug as second (Goto to Bot2) SetPlayerSkin(playerid, 57); return 1; } return 1; }
Код:
public OnPlayerSpawn(playerid) { if(IsPlayerNPC(playerid)) { new npcname[MAX_PLAYER_NAME]; GetPlayerName(playerid, npcname, sizeof(npcname)); if(!strcmp(npcname, "Bot2", true)) { //Npc Out of Interior SetPlayerSpawn(playerid); return 1; } if(!strcmp(npcname, "Bot3", true)) { //In Interiro SetPlayerSpawn(playerid); return 1; } return 1; }