#include <a_samp> #define COLOR_GREEN 0x33AA33AA new fast_ls_lv; public OnGameModeInit() { ConnectNPC ("fast_ls_lv","fast_ls_lv"); // fast_ls_lv = AddStaticVehicle(405,2044.8854,1473.2106,10.4494,181.3339,1,0); return 1; } public OnPlayerSpawn(playerid) { if(!strcmp(playername,"fast_ls_lv",true)) { SetSpawnInfo( playerid, 0, 228, 1958.33, 1343.12, 15.36, 269.15, 31, 1000, 0, 0, 0, 0 ); PutPlayerInVehicle(playerid, fast_ls_lv, 0); SetPlayerColor(playerid,0x494543FF); new Text3D:PTD1 = Create3DTextLabel("NPC_fast_ls_lv(ID:17)",0x33AA33AA,30.0,40.0,50.0,40.0,0); Attach3DTextLabelToPlayer(PTD1, playerid, 0.0, 0.0, 0.5); } return 1; }
#define RECORDING "fast_ls_lv" #define RECORDING_TYPE 1 #include <a_npc> main(){} public OnRecordingPlaybackEnd() StartRecordingPlayback(RECORDING_TYPE, RECORDING); public OnNPCEnterVehicle(vehicleid, seatid) StartRecordingPlayback(RECORDING_TYPE, RECORDING); public OnNPCExitVehicle() StopRecordingPlayback();
//your command and under that command put this
StartRecordingPlayback(PLAYER_RECORDING_TYPE_DRIVER,"your recorded file name");// ON_FOOT for on foot npc's
if(strcmp(cmdtext, "/start", true) == 0) { StartRecordingPlayback(PLAYER_RECORDING_TYPE_DRIVER,"fast_ls_lv"); SendClientMessageToAll(COLOR_MBLUE, "[NPC] NPC fast_ls_lv is leaving."); return 1; }
if (IsPlayerNPC(playerid))
{
SetPlayerColor(playerid, color);// to find npc set their color to unused color in game
}
put it under callback onplayer spawn
pawn Код:
|
C:\Program Files (x86)\Rockstar Games\GTA Server\gamemodes\v1.6.pwn(445) : error 017: undefined symbol "StartRecordingPlayback" Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase 1 Error.
#include <a_samp> #include <a_npc> #include <core> #include <float> //---------------------------------------------------------- #define COLOR_WHITE 0xFFFFFFFF #define COLOR_NORMAL_PLAYER 0xFF4444FF public OnPlayerCommandText(playerid, cmdtext[]) { if(strcmp(cmdtext, "/start", true) == 0) { StartRecordingPlayback(PLAYER_RECORDING_TYPE_DRIVER,"fast_ls_lv"); SendClientMessageToAll(COLOR_WHITE, "[NPC] NPC fast_ls_lv is leaving."); return 1; } return 0; }
C:\Program Files (x86)\Rockstar Games\GTA Server\npc.pwn(14) : error 017: undefined symbol "StartRecordingPlayback" Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase 1 Error.