08.07.2014, 12:26
Hi guys,
I have a problem. When the NPC connect to a server, the server doesn't put him in the vehicle. I see red color of NPC at coords 0.0, 0.0, 0.0
OnPlayerSpawn
OnGameModeInit
NPC script
I have a problem. When the NPC connect to a server, the server doesn't put him in the vehicle. I see red color of NPC at coords 0.0, 0.0, 0.0
OnPlayerSpawn
Код:
if(IsPlayerNPC(playerid)) //UKOLIKO JE PRIJAVLJENI IGRAC BOT { if(!strcmp(name, "Vozac_Tramvaja", true)) //UKOLIKO JE BOT KOJI VOZI TRAMVAJ { SetPlayerColor(playerid, 0xF00000FF); SetPlayerSkin(playerid, 61); PutPlayerInVehicle(playerid, bot_vozilo, false); } else //UKOLIKO JE TO NEKI DRUGI BOT { Ban(playerid); } }
Код:
//KREIRANJE BOTOVA bot_vozilo = CreateVehicle(449, 0.0, 0.0, 5.0, 0.0, 3, 3, 3600); ConnectNPC("Vozac_Tramvaja","tramvaj");
Код:
#define RECORDING "tramvaj" #define RECORDING_TYPE 1 #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