08.05.2010, 18:32
Hey, i have one problem, i add npc bot to server, but npc There is no.
server.cfg
[quote]maxnpc 1[/pawn]
npcmodes
added
pawn Код:
new Caddy1;
pawn Код:
public OnGameModeInit()
{
// NPCS
ConnectNPC("Caddy1","caddy1");
Caddy1 = AddStaticVehicle(457,1402.7024,2816.2568,10.4394,89.0047,13,1);
return 1;
}
pawn Код:
public OnPlayerSpawn(playerid)
{
if(!IsPlayerNPC(playerid)) return 0;
new playername[64];
GetPlayerName(playerid,playername,64);
if(!strcmp(playername,"Caddy1",true))
{
SetSpawnInfo( playerid, 0, 258, 1958.33, 1343.12, 15.36, 269.15, 2, 1, 0, 0, 0, 0 );
PutPlayerInVehicle(playerid, Caddy1, 0);
SetPlayerColor(playerid,0xFFFF00AA);
}
return 1;
}
server.cfg
[quote]maxnpc 1[/pawn]
npcmodes
added
pawn Код:
caddy.amx caddy1.pwn
pawn Код:
recording
added
caddy1.rec