02.12.2012, 16:05
pawn Код:
forward createNpc();
forward create_Train(id);
pawn Код:
new VTrain01;
pawn Код:
VTrain01 = AddStaticVehicleEx(538, 0.0, 0.0, 5.0, 0.0, 3, 3, 5000);
pawn Код:
else if(!strcmp(playername,"Train_01",true))
{ //Agent Fbi protection
print("[Npc] Initialisation - Train 01");
SetPlayerSkin(playerid,255);
engineOn[1] = true;
car_Engine(1);
PutPlayerInVehicle(playerid, VTrain01, 0);
GetVehicleParamsEx(538,engine,lights,alarm,doors,bonnet,boot,objective);
SetCarChange(1,engine,1,alarm,doors,bonnet,boot,objective);
}
createNpc :
pawn Код:
ConnectNPC("Train_01","train");
create_Train(1);
public create_Train(id) :
pawn Код:
{
new botname[64];
format(botname,sizeof(botname),"Train_%d",id);
ConnectNPC(botname,"train");
id++;
if(id < 7)
{
SetTimerEx("create_Train", 124000, false, "d", id);
}
}