-
Notifications
You must be signed in to change notification settings - Fork 31
Standard NPC Alternatives
WoutProvost edited this page Jul 16, 2019
·
4 revisions
Home ▸ Standard NPC Alternatives
- SA-MP wiki: http://wiki.sa-mp.com/wiki/NPC:OnNPCModeInit
- Description: Gets called when an NPC script gets loaded.
- FCNPC equivalent: None, not relevant, we don't use npc modes.
- SA-MP wiki: http://wiki.sa-mp.com/wiki/NPC:OnNPCModeExit
- Description: Gets called when an NPC script gets unloaded.
- FCNPC equivalent: None, not relevant, we don't use npc modes.
- SA-MP wiki: http://wiki.sa-mp.com/wiki/NPC:OnNPCConnect
- Description: Gets called when an NPC gets connected to the server.
- FCNPC equivalent: FCNPC_OnCreate
- SA-MP wiki: http://wiki.sa-mp.com/wiki/NPC:OnNPCDisconnect
- Description: Gets called when an NPC gets disconnected from the server.
- FCNPC equivalent: FCNPC_OnDestroy
- SA-MP wiki: http://wiki.sa-mp.com/wiki/NPC:OnNPCSpawn
- Description: Gets called when an gets NPC spawned.
- FCNPC equivalent: FCNPC_OnSpawn
- SA-MP wiki: http://wiki.sa-mp.com/wiki/NPC:OnNPCEnterVehicle
- Description: Gets called when an NPC enters a vehicle.
- FCNPC equivalent: FCNPC_OnVehicleEntryComplete
- SA-MP wiki: http://wiki.sa-mp.com/wiki/NPC:OnNPCExitVehicle
- Description: Gets called when an NPC exits a vehicle.
- FCNPC equivalent: FCNPC_OnVehicleExitComplete
- SA-MP wiki: http://wiki.sa-mp.com/wiki/NPC:OnPlayerDeath (don't confuse with http://wiki.sa-mp.com/wiki/OnPlayerDeath)
- Description: Gets called when an NPC dies.
- FCNPC equivalent: FCNPC_OnDeath
- SA-MP wiki: http://wiki.sa-mp.com/wiki/NPC:OnRecordingPlaybackEnd
- Description: Gets called when a recorded file being played back has reached to its end.
- FCNPC equivalent: FCNPC_OnFinishPlayback
- SA-MP wiki: http://wiki.sa-mp.com/wiki/NPC:OnPlayerStreamIn (don't confuse with http://wiki.sa-mp.com/wiki/OnPlayerStreamIn)
- Description: Gets called when a player is streamed in by an NPC.
- FCNPC equivalent: None. NPCs don't stream anything, only a player's client does that, so using the player version of OnPlayerStreamIn will not work as an alternative. FCNPC_OnStreamIn gets called when an NPC is streamed in by a player, which is the equivalent of the player version of OnPlayerStreamIn and not the NPC version of OnPlayerStreamIn.
- SA-MP wiki: http://wiki.sa-mp.com/wiki/NPC:OnPlayerStreamOut (don't confuse with http://wiki.sa-mp.com/wiki/OnPlayerStreamOut)
- Description: Gets called when a player is streamed out by an NPC.
- FCNPC equivalent: None. NPCs don't stream anything, only a player's client does that, so using the player version of OnPlayerStreamOut will not work as an alternative. FCNPC_OnStreamOut gets called when an NPC is streamed out by a player, which is the equivalent of the player version of OnPlayerStreamOut and not the NPC version of OnPlayerStreamOut.
- SA-MP wiki: http://wiki.sa-mp.com/wiki/NPC:OnVehicleStreamIn (don't confuse with http://wiki.sa-mp.com/wiki/OnVehicleStreamIn)
- Description: Gets called when a vehicle is streamed in by an NPC.
- FCNPC equivalent: None. NPCs don't stream anything, only a player's client does that, so using the player version of OnVehicleStreamIn will not work as an alternative.
- SA-MP wiki: http://wiki.sa-mp.com/wiki/NPC:OnVehicleStreamOut (don't confuse with http://wiki.sa-mp.com/wiki/OnVehicleStreamOut)
- Description: Gets called when a vehicle is streamed out by an NPC.
- FCNPC equivalent: None. NPCs don't stream anything, only a player's client does that, so using the player version of OnVehicleStreamOut will not work as an alternative.
- SA-MP wiki: http://wiki.sa-mp.com/wiki/NPC:OnClientMessage
- Description: Gets called when an NPC sees a client message (broadcast or personally to him).
- FCNPC equivalent: None, but can be simulated by hooking SendClientMessageToAll and SendClientMessage. This callback gets called whenever an NPC sees a client message. This will be everytime a SendClientMessageToAll function is used and everytime a SendClientMessage function is used towards an NPC. This callback won't be called when someone says something in the chat.
- SA-MP wiki: http://wiki.sa-mp.com/wiki/NPC:OnPlayerText (don't confuse with http://wiki.sa-mp.com/wiki/OnPlayerText)
- Description: Gets called when anyone says anything in the chat.
- FCNPC equivalent: None, but can be simulated by hooking the player version of OnPlayerText and SendPlayerMessageToAll. Opposed to the player version of this callback, this callback gets called everytime anyone says anything in the chat. This includes any player and any other NPC or the same NPC himself with SendChat.
- SA-MP wiki: http://wiki.sa-mp.com/wiki/ConnectNPC (no NPC: prefix)
- Description: Connect an NPC to the server.
- FCNPC equivalent: FCNPC_Create
- SA-MP wiki: http://wiki.sa-mp.com/wiki/IsPlayerNPC (no NPC: prefix)
- Description: Checks whether a player is an actual player or an NPC.
- FCNPC equivalent: FCNPC_IsValid. IsPlayerNPC will still work with NPCs created with FCNPC, but if you specifically want to check if the NPC is created with FCNPC and is not a standard NPC, you will need FCNPC_IsValid.
- SA-MP wiki: http://wiki.sa-mp.com/wiki/NPC:GetMyPos
- Description: Get the position of an NPC.
- FCNPC equivalent: FCNPC_GetPosition
- SA-MP wiki: http://wiki.sa-mp.com/wiki/NPC:SetMyPos
- Description: Set the position of an NPC.
- FCNPC equivalent: FCNPC_SetPosition
- SA-MP wiki: http://wiki.sa-mp.com/wiki/NPC:GetMyFacingAngle
- Description: Get the facing angle of an NPC.
- FCNPC equivalent: FCNPC_GetAngle
- SA-MP wiki: http://wiki.sa-mp.com/wiki/NPC:SetMyFacingAngle
- Description: Set the facing angle of an NPC.
- FCNPC equivalent: FCNPC_SetAngle
- SA-MP wiki: http://wiki.sa-mp.com/wiki/NPC:StartRecordingPlayback
- Description: Start playing back a recording.
- FCNPC equivalent: FCNPC_StartPlayingPlayback
- SA-MP wiki: http://wiki.sa-mp.com/wiki/NPC:StopRecordingPlayback
- Description: Stop playing back a recording.
- FCNPC equivalent: FCNPC_StopPlayingPlayback
- SA-MP wiki: http://wiki.sa-mp.com/wiki/NPC:PauseRecordingPlayback
- Description: Pause playing back a recording.
- FCNPC equivalent: FCNPC_PausePlayingPlayback
- SA-MP wiki: http://wiki.sa-mp.com/wiki/NPC:ResumeRecordingPlayback
- Description: Resume playing back a recording.
- FCNPC equivalent: FCNPC_ResumePlayingPlayback
- SA-MP wiki: http://wiki.sa-mp.com/wiki/NPC:GetDistanceFromMeToPoint
- Description: Get the distance between an NPC and a point.
- FCNPC equivalent: None, not needed, use GetPlayerDistanceFromPoint.
- SA-MP wiki: http://wiki.sa-mp.com/wiki/NPC:IsPlayerStreamedIn (don't confuse with http://wiki.sa-mp.com/wiki/IsPlayerStreamedIn)
- Description: Checks whether a player is streamed in for an NPC.
- FCNPC equivalent: None. NPCs don't stream anything, only a player's client does that, so using the player version of IsPlayerStreamedIn with the first parameter the player and the second an NPC will not work as an alternative. FCNPC_IsStreamedIn can be used to check if an NPC is streamed in for a player, which is the equivalent of the player version of IsPlayerStreamedIn with the first parameter an NPC and the second the player and not the NPC version of IsPlayerStreamedIn.
- SA-MP wiki: http://wiki.sa-mp.com/wiki/NPC:IsVehicleStreamedIn (don't confuse with http://wiki.sa-mp.com/wiki/IsVehicleStreamedIn)
- Description: Checks whether a vehicle is streamed in for an NPC.
- FCNPC equivalent: None. NPCs don't stream anything, only a player's client does that, so using the player version of IsVehicleStreamedIn will not work as an alternative.
- SA-MP wiki: http://wiki.sa-mp.com/wiki/NPC:SendChat
- Description: Let an NPC send a player text in chat.
- FCNPC equivalent: None, not needed, use SendPlayerMessageToAll.
- SA-MP wiki: http://wiki.sa-mp.com/wiki/NPC:SendCommand
- Description: Let an NPC execute a command.
- FCNPC equivalent: None, not needed, use CallRemoteFunction to simulate calling OnPlayerCommandText.
Wiki written by Freaksken.