20.11.2013, 18:18
Hello everybody I have another bug in my gamemode i'll try to create NPC who rides around the city, and it's almost done but again I have mistake...
Code:
In npcmodes:
In my Gamemode:
INIT
in OnPlayerSpawn:
The NPC Pardaveja and Pardaveja_A spawns, but the NPC taksistas doesen't run, but connect...
Server_LOG:
Thanks in advice for helpin
Code:
In npcmodes:
Код:
#define RECORDING "taksioras" //Jūsų failo pavadinimas. #define RECORDING_TYPE 1 //1 reiљkia, kad veiksmas vyko transporte, o 2 reiљkia, kad veiksmas buvo ant kojų. #include <a_npc> main(){} public OnRecordingPlaybackEnd() StartRecordingPlayback(RECORDING_TYPE, RECORDING); #if RECORDING_TYPE == 1 public OnNPCEnterVehicle(vehicleid, seatid) StartRecordingPlayback(RECORDING_TYPE, RECORDING); public OnNPCExitVehicle() StopRecordingPlayback(); #else public OnNPCSpawn() StartRecordingPlayback(RECORDING_TYPE, RECORDING); #endif
INIT
Код:
ConnectNPC("Taksistas","taksioras"); TaksiMasina = CreateVehicle(420, 0.0, 0.0, 5.0, 0.0, 6, 6, 5000);
Код:
if(IsPlayerNPC(playerid)) //Tikrina, ar ћaidėjas paleistas kaip NPC botas. { new npcname[MAX_PLAYER_NAME]; GetPlayerName(playerid, npcname, sizeof(npcname)); //Gauna NPC boto vardą. if(!strcmp(npcname, "Pardaveja", true)) //Tikrina, ar NPC boto vardas Martin_M { SetPlayerSkin(playerid, 76); } if(!strcmp(npcname, "Pardaveja_A", true)) //Tikrina, ar NPC boto vardas Martin_M { SetPlayerSkin(playerid, 76); } if(!strcmp(npcname, "Taksistas", true)) //Ar čia taksistas? { PutPlayerInVehicle(playerid, TaksiMasina, 0); SetPlayerSkin(playerid, 189); } return 1; }
Server_LOG:
Код:
[21:11:02] [npc:join] Pardaveja_A has joined the server (0:127.0.0.1) [21:11:02] [npc:join] Pardaveja has joined the server (1:127.0.0.1) [21:11:02] [npc:join] Taksistas has joined the server (2:127.0.0.1)