simple NPC script
#4

Add something like this into your script but change the xyz's with your own and if you have any questions feel free to PM me
pawn Код:
new Bus;
public OnGameModeInit()
{
        ConnectNPC("Johnny_Driver","bus1");
        Bus = AddStaticVehicle(431,x, y, z, float,0,0);
        return 1;
}
public OnPlayerRequestClass(playerid, classid)
{
    new playername[64];
    GetPlayerName(playerid,playername,64);

    if(!strcmp(playername,"Johnny_Driver",true))
    {
        SetSpawnInfo(playerid,69,61,x,y,z,0.0,-1,-1,-1,-1,-1,-1);
    }
        return 1;
}
public OnPlayerSpawn(playerid)
{
    new playername[64];
    GetPlayerName(playerid,playername,64);

    if(!strcmp(playername,"Johnny_Driver",true))
        {
        PutPlayerInVehicle(playerid, Bus, 0);
        SetPlayerColor(playerid,0xFF0000FF);
    }        
}
stock SetVehicleTireStatus(vehicleid, tirestatus)
{
    new panels, doors, lights, tires;
    GetVehicleDamageStatus(vehicleid, panels, doors, lights, tires);
    UpdateVehicleDamageStatus(vehicleid, panels, doors, lights, tirestatus);
}
Reply


Messages In This Thread
simple NPC script - by MatZZPL - 12.11.2012, 19:00
Re: simple NPC script - by Deron_Green - 12.11.2012, 19:20
Re: simple NPC script - by MatZZPL - 12.11.2012, 19:41
Re: simple NPC script - by Deron_Green - 13.11.2012, 01:41

Forum Jump:


Users browsing this thread: