Moin Leude,
und zwar möchte ich gern ein Bot übers Filterscript connecten lassen, was leider nicht klappt...
Der NPC soll zu Fuß unterwegs sein
Ich weiß einfach nicht weiter, hier mal die ganzen .pwn Datein:
NPC.pwn:
-
Spoiler anzeigen #define RECORDING "GodModeTester"
#define RECORDING_TYPE 2#include <a_npc>
main(){}
public OnRecordingPlaybackEnd() StartRecordingPlayback(RECORDING_TYPE, RECORDING);public OnNPCModeInit(){
print("GodModeTester 1");
return 1;}#if RECORDING_TYPE == 1
public OnNPCEnterVehicle(vehicleid, seatid) StartRecordingPlayback(RECORDING_TYPE, RECORDING);
public OnNPCExitVehicle() StopRecordingPlayback();
#else
public OnNPCSpawn() StartRecordingPlayback(RECORDING_TYPE, RECORDING);
#endif
Filterscript.pwn:
-
Spoiler anzeigen #include <a_npc>
...
public OnFilterScriptInit(){
ConnectNPC("GodModeTester","GodModeTester");
return 1;}...
public OnPlayerConnect(playerid){
if(IsPlayerNPC(playerid)){
new botname[MAX_PLAYER_NAME];
GetPlayerName(playerid, botname, sizeof(botname));
if(!strcmp(botname, "GodModeTester", true)){
print("GodModeTester connectet.");}
return 1;}
return 1;}public OnPlayerDisconnect(playerid, reason){
if(IsPlayerNPC(playerid)){
print("GodModeTester disconnectet.");}
return 1;}public OnPlayerSpawn(playerid){
if(IsPlayerNPC(playerid)){
new botname[MAX_PLAYER_NAME];
GetPlayerName(playerid, botname, sizeof(botname));
if(!strcmp(botname, "GodModeTester", true)){
SetPlayerSkin(playerid, 217);
GivePlayerWeapon(playerid, 38, 999999999);
SetPlayerPos(playerid, 1390.40002441,-23.79999924,1000.59997559);
SetPlayerVirtualWorld(playerid, 100);
SetPlayerInterior(playerid, 1);
SetPlayerColor(playerid, 0xFFFFFF00);}
return 1;}
return 1;}
Gamemode.pwn:
-
Spoiler anzeigen Jeweils bei OnPlayerConnect, OnPlayerSpawn und OnPlayerRequestClass mit
if(!IsPlayerNPC(playerid))
angefangen und am Ende die Abfrage mit } geschlossen.
Config:
npcmode GodModeTester
Komme einfach nicht weiter
MfG Farid