24.03.2010, 19:09
Hey,
I recorded a npc, that walks around the streets, and it don't work.. Can someone tell me what i did wrong?
NPCscript:
Filterscript:
I recorded a npc, that walks around the streets, and it don't work.. Can someone tell me what i did wrong?
NPCscript:
Код:
#define RECORDING "Walk" #define RECORDING_TYPE 2 #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
Код:
#include <a_samp> #if defined FILTERSCRIPT public OnFilterScriptInit() { print("\n--------------------------------------"); print(" Walking NPC "); print("--------------------------------------\n"); return 1; } main() { print("\n----------------------------------"); print(" Walking NPC"); print("----------------------------------\n"); } #endif public OnGameModeInit() { ConnectNPC("WalkingNPC","Walk"); } public OnPlayerSpawn(playerid) { if(IsPlayerNPC(playerid)) { new npcname[MAX_PLAYER_NAME]; GetPlayerName(playerid, npcname, sizeof(npcname)); if(!strcmp(npcname, "WalkingNPC", true)) { if(IsPlayerNPC(playerid)) return 1; SetSpawnInfo( playerid, 0, 108, 1958.33, 1343.12, 15.36, 269.15, 31, 1000, 0, 0, 0, 0 ); SetPlayerColor(playerid,0xFFFF00AA); return 1; } } return 1; }