Trains and NPC's and such...
#1

pawn Код:
public Trains(playerid)
{
    new trains=1;
    if(trains==10)
    {
        KillTimer(Traintimer);
        return 0;
    }
    new npcn[20];
    trains++;
    format(npcn,sizeof(npcn),"[NPC]Train[%i]",trains);
    ConnectNPC(npcn,"train_ls");
    for(new i=0;i<MAX_PLAYERS;i++)
    {
        if(dUserINT(PlayerName(i)).("Admin level"))
        {
            SendClientMessage(i,0x0000FFAA,"[!]Beep?");
        }
        else if(IsPlayerNPC(i) && !strcmp(PlayerName(i),npcn))
        {
            new train=AddStaticVehicleEx(538,0,0,0,270,-1,-1,10000000000);
            PutPlayerInVehicle(i,train,0);
        }
    }
    return 1;
}
As you can probably tell, im trying to add a train to the track after time passes after the 1st train leaves (a timer is linked to this for 90 secs). What happens is that the NPC spawns but is not placed in the vehicle. I'm probably doing something obviously stupid but I don't see whats wrong......help?
Reply


Messages In This Thread
Trains and NPC's and such... - by mastasquizy - 27.07.2010, 22:07
Re: Trains and NPC's and such... - by Conroy - 27.07.2010, 22:41
Re: Trains and NPC's and such... - by John_F - 27.07.2010, 22:46
Re: Trains and NPC's and such... - by mastasquizy - 28.07.2010, 00:21

Forum Jump:


Users browsing this thread: 2 Guest(s)