Quote:
Originally Posted by thuron
Be sure you have
Код:
if(IsPlayerNPC(playerid)) return 1;
on every line that the npc uses. so onplayerconnect,onplayerspawn and all those. like this:
Код:
public OnPlayerConnect(playerid)
{
if(IsPlayerNPC(playerid)) return 1;
//And here the rest of ur stuff
i hope it helped.
|
READ THE FIRST POST.
I clearly say that no anti cheat or login system
But I shall post it here so you may try to help
Код:
new MyFirstNPCVehicle; //Global variable!
public OnGameModeInit()
{
print("my gamemode");
ConnectNPC("ekanpc","auto");
MyFirstNPCVehicle = CreateVehicle(596, 0.0, 0.0, 5.0, 0.0, 0, 1, 5000);
// Don't use these lines if it's a filterscript
AddPlayerClass (280,1546.4946,-1669.2950,13.5667,89.9685,22,9999,25,9999,28,9999); //
AddPlayerClass (281,1552.4883,-1675.6952,16.1953,86.2085,23,9999,26,9999,29,9999); //
AddPlayerClass (283,1547.4001,-1681.6907,13.5590,93.1879,24,9999,27,9999,30,9999); //
AddPlayerClass (111,1513.4779,-1670.4403,14.0469,269.1342,22,9999,25,9999,28,9999); //
AddPlayerClass (112,1513.0527,-1675.1556,14.0469,282.4823,23,9999,26,9999,29,9999); //
AddPlayerClass (113,1512.9187,-1679.9777,14.0469,260.4861,24,9999,27,9999,30,9999); //
AddStaticVehicle (596,1536.0159,-1668.4324,13.3828,359.5500,0,1);
return 1;
}
This is my OnGameModeInit
Код:
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, "ekanpc", true)) //Checking if the NPC's name is MyFirstNPC
{
PutPlayerInVehicle(playerid, MyFirstNPCVehicle, 0); //Putting the NPC into the vehicle we created for it.
}
return 1;
}
//Other stuff for normal players goes here!
return 1;
}
And this is OnPlayerSpawn
I do have a rec file called auto which on he should drive a car but should a NPC be seed on the score list?
If so whats the problem?