NPC help
#1

How i can do NPC join in to server from USERS example

Key=botukelis
Level=1
AdminLevel=0
DonateRank=0
UpgradePoints=0
ConnectedTime=0
Registered=1
Sex=1
Age=32
Origin=1
CK=0
Muted=0
Respect=0
Money=400
Bank=0
Crimes=0
Kills=0
Deaths=0
Arrested=0
WantedDeaths=0
Phonebook=0
LottoNr=0
Fishes=0
BiggestFish=0
Job=0
Paycheck=372
HeadValue=0
Jailed=0
JailTime=0
Materials=0
Drugs=0
Leader=0
Member=0
FMember=255
Rank=0
Char=255
ContractTime=0
DetSkill=0
SexSkill=0
BoxSkill=0
LawSkill=0
MechSkill=0
JackSkill=0
CarSkill=0
NewsSkill=0
DrugsSkill=0
CookSkill=0
FishSkill=0
pSHealth=0.0
pHealth=50.0
Int=6
Local=255
Team=3
Model=135
PhoneNr=560095
Car=999
Car2=999
Car3=999
House=255
Bizz=255
Pos_x=1174.5
Pos_y=-1329.4
Pos_z=1006.4
CarLic=1
FlyLic=0
BoatLic=0
FishLic=0
GunLic=0
Gun1=0
Gun2=0
Gun3=0
Gun4=0
Ammo1=0
Ammo2=0
Ammo3=0
Ammo4=0
CarTime=0
PayDay=1
PayDayHad=0
Watch=0
Crashed=0
Wins=0
Loses=0
AlcoholPerk=0
DrugPerk=0
MiserPerk=0
PainPerk=0
TraderPerk=0
Tutorial=1
Mission=0
Warnings=0
VirWorld=0
Fuel=0
Married=0
MarriedTo=No-one
FishTool=0
Note1=None
Note1s=0
Note2=None
Note2s=0
Note3=None
Note3s=0
Note4=None
Note4s=0
Note5=None
Note5s=0
InvWeapon=0
InvAmmo=0
Lighter=0
Cigarettes=0
Locked=0


That i do but how i can do he's join and auto write /login pass this is my FS

/*(---------------------------------)
( __ ___ ___ _ _ )
( \ \ / / |__ ___ / __/ | |_ _ _ )
( \ V /| / _/ -_) (__| | _| || | )
( \_/ |_\__\___|\___|_|\__|\_, | )
( |__/ )
( FS Made By V1ceC1ty )
( )
( Credits To: )
( All The SA-MP Team )
( wiki.sa-mp.com )
( Some of kc's NPC Tutorial )
(---------------------------------)*/

#include <a_samp>

new Shamal;

public OnGameModeInit()
{
ConnectNPC("Pilot","FlightPath");
Shamal = AddStaticVehicle(519,1477.9646,1310.6903,11.7421,1 80.0445,1,1); // Shamal
return 1;
}

public OnGameModeExit()
{
return 1;
}

public OnPlayerRequestClass(playerid, classid)
{
return 1;
}

public OnPlayerRequestSpawn(playerid)
{
return 1;
}

public OnPlayerConnect(playerid)
{
return 1;
}

public OnPlayerDisconnect(playerid, reason)
{
return 1;
}

public OnPlayerSpawn(playerid)
{
if(IsPlayerNPC(playerid)) //Checks if the player is an NPC.
{
new npcname[MAX_PLAYER_NAME];
GetPlayerName(playerid, npcname, sizeof(npcname)); //Gets the NPC's name
if(!strcmp(npcname, "Pilot", true)) //Checks if the NPC's name is Pilot
{
PutPlayerInVehicle(playerid, Shamal, 0); //Puts the NPC into the Shamal.
}
}
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[])
{
if (strcmp("/mycommand", cmdtext, true, 10) == 0)
{
// Do something here
return 1;
}
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 OnObjectMoved(objectid)
{
return 1;
}

public OnPlayerObjectMoved(playerid, objectid)
{
return 1;
}

public OnPlayerPickUpPickup(playerid, pickupid)
{
return 1;
}

public OnPlayerSelectedMenuRow(playerid, row)
{
return 1;
}

public OnPlayerExitedMenu(playerid)
{
return 1;
}


That's not my FS i download it help me
Reply
#2

whay you just dont check is the player or NPC and if NPC just skip login?
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)