help with npc's
#3

Quote:
Originally Posted by mansonh
am i followed that and it didnt work

#include <a_samp>

#define YELLOW 0x2641FEAA

//------------------------------------------------------------------------------

public OnFilterScriptInit()
{
print("\n--------------------------------------");
print(" ADMIN MAP BY JOHNATHON956");
print("--------------------------------------\n");
ConnectNPC("Drug_Dealer","Drug_Dealer");
CreateVehicle(400, 0.0, 0.0, 5.0, 0.0, 3, 3, 5000);
AddStaticVehicle(562,-81.5114,4857.3120,17.7608,180.2982,94,73); // admincar2
AddStaticVehicle(489,-77.7558,4857.5635,18.2448,180.4505
return 1;
}

public OnFilterScriptExit()
{
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, "Drug_Dealer", true)) //Checking if the NPC's name is MyFirstNPC
{
PutPlayerInVehicle(playerid, 400, 0); //Putting the NPC into the vehicle we created for it.
}
return 1;
}
//Other stuff for normal players goes here!
return 1;
}

public OnPlayerCommandText(playerid, cmdtext[])
{
if (strcmp("/adminmap", cmdtext, true, 10) == 3)
{
new name[MAX_PLAYER_NAME],string[128];
GetPlayerName(playerid,name,sizeof(name));
format(string,sizeof(string),"%s has teleported to the ADMIN MAP!)",name);
SendClientMessage(playerid,YELLOW,string);
SetPlayerPos(playerid,-70.1664,4846.7148,25.7165);
SetPlayerFacingAngle(playerid,322.263;
return 1;
}
return 0;
}
Reply


Messages In This Thread
help with npc's - by johnathon956 - 01.02.2010, 16:47
Re: help with npc's - by mansonh - 01.02.2010, 17:53
Re: help with npc's - by johnathon956 - 01.02.2010, 18:09

Forum Jump:


Users browsing this thread: 1 Guest(s)