Originally Posted by V1ceC1ty
|
Originally Posted by V1ceC1ty
There is a solution, read it all. It's even in big writing.
|
if(IsPlayerNPC(playerid)) return 1;
Originally Posted by Ma
Quote:
Code:
if(IsPlayerNPC(playerid)) return 1; |
Originally Posted by V1ceC1ty
Quote:
|
onPlayerCommandText(npc_id_here, "/command");
Originally Posted by [KMA
DlennartD ]
Try like KC says: Code:
nPlayerCommandText(npc_id_here, "/command"); |
Originally Posted by Ma
Quote:
|
Originally Posted by Ma
Nope, isn't working, I still get the same thing, this time I tryd V1ceC1ty his taxi filterscript:
|
Originally Posted by [KMA
DlennartD ]
Oh sorry I made a mistake, it need to be onPlayerCommandText(npc_id_here, "/command"); not nPlayerCommandText(npc_id_here, "/command"); |
Originally Posted by V1ceC1ty
Have you changed maxnpcs?
|
Originally Posted by CalgonX
Quote:
Quote:
|
Originally Posted by V1ceC1ty
If he posts the FS and npcmode ill be able to fix it. :l
|
#include <a_samp> #include <dini> #define COLOR_YELLOW 0xFFFF00AA new MyFirstNPCVehicle; //Global variable! forward OnPlayerLogin(playerid,password[]); forward OnNPCConnect(myplayerid); public OnFilterScriptInit() { ConnectNPC("Yoko","politie"); MyFirstNPCVehicle = CreateVehicle(596,1535.7097,-1677.5266,13.1147,359.5821, 0, 1, 5000); return 1; } public OnFilterScriptExit() { return 1; } public OnPlayerRequestClass(playerid, classid) { SendClientMessage(playerid, COLOR_YELLOW, "Requesting Class"); return 1; } public OnPlayerConnect(playerid) { return 1; } public OnPlayerDisconnect(playerid, reason) { return 1; } public OnPlayerLogin(playerid,password[]) { return 1; } public OnPlayerSpawn(playerid) { if(IsPlayerNPC(playerid)) //Checks if the player that just spawned is an NPC. { new npcname[MAX_PLAYER_NAME]; GetPlayerName(playerid, npcname, sizeof(npcname)); //Getting the NPC's name. if(!strcmp(npcname, "Yoko", true)) //Checking if the NPC's name is MyFirstNPC { print("spawn"); OnPlayerCommandText(playerid, "/login password"); PutPlayerInVehicle(playerid, MyFirstNPCVehicle, 0); //Putting the NPC into the vehicle we created for it. SetPlayerSkin(playerid,280); //Give NPC a skin } return 1; } //Other stuff for normal players goes here! return 1; } public OnPlayerDeath(playerid, killerid, reason) { return 1; } public OnVehicleSpawn(vehicleid) { return 1; } public OnVehicleDeath(vehicleid, killerid) { return 1; } public OnPlayerText(playerid, text[]) { return 1; } public OnPlayerCommandText(playerid, cmdtext[]) { return 0; } public OnPlayerEnterVehicle(playerid, vehicleid, ispassenger) { return 1; } public OnPlayerExitVehicle(playerid, vehicleid) { return 1; } public OnPlayerStateChange(playerid, newstate, oldstate) { return 1; } public OnPlayerEnterCheckpoint(playerid) { return 1; } public OnPlayerLeaveCheckpoint(playerid) { return 1; } public OnPlayerEnterRaceCheckpoint(playerid) { return 1; } public OnPlayerLeaveRaceCheckpoint(playerid) { return 1; } public OnRconCommand(cmd[]) { return 1; } public OnPlayerRequestSpawn(playerid) { return 1; } public OnObjectMoved(objectid) { return 1; } public OnPlayerObjectMoved(playerid, objectid) { return 1; } public OnPlayerPickUpPickup(playerid, pickupid) { return 1; } public OnVehicleMod(playerid, vehicleid, componentid) { return 1; } public OnVehiclePaintjob(playerid, vehicleid, paintjobid) { return 1; } public OnVehicleRespray(playerid, vehicleid, color1, color2) { return 1; } public OnPlayerSelectedMenuRow(playerid, row) { return 1; } public OnPlayerExitedMenu(playerid) { return 1; } public OnPlayerInteriorChange(playerid, newinteriorid, oldinteriorid) { return 1; } public OnPlayerKeyStateChange(playerid, newkeys, oldkeys) { return 1; } public OnRconLoginAttempt(ip[], password[], success) { return 1; } public OnPlayerUpdate(playerid) { return 1; } public OnPlayerStreamIn(playerid, forplayerid) { return 1; } public OnPlayerStreamOut(playerid, forplayerid) { return 1; } public OnVehicleStreamIn(vehicleid, forplayerid) { return 1; } public OnVehicleStreamOut(vehicleid, forplayerid) { return 1; } public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[]) { return 1; } public OnPlayerClickPlayer(playerid, clickedplayerid, source) { return 1; } public OnNPCConnect(myplayerid) { printf("I successfully connected the server with ID %i!", myplayerid); }
#define RECORDING "politie" //This is the filename of your recording without the extension. #define RECORDING_TYPE 1 //1 for in vehicle and 2 for on foot. #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
if(gPlayerLogged[playerid] == 0) |
if(gPlayerLogged[playerid] == 0) { SendClientMessage(playerid, COLOR_LIGHTRED, "** This server requires a Login BEFORE spawn (Kicked) **"); KickPlayer[playerid] = 1; } |
if(gPlayerLogged[playerid] == 0) { if(IsPlayerNPC(playerid)) return 1; SendClientMessage(playerid, COLOR_LIGHTRED, "** This server requires a Login BEFORE spawn (Kicked) **"); KickPlayer[playerid] = 1; } |
if(gPlayerLogged[playerid] == 0) { SendClientMessage(playerid, COLOR_LIGHTRED, "You are not logged in so you are in demo mode."); SendClientMessage(playerid, COLOR_LIGHTRED, "This means you can't save your stats, choose a character or talk."); SendClientMessage(playerid, COLOR_LIGHTRED, "To do this you must /login *password* or /register *password* if you haven't done so"); } |