Help about LS Bus System
#1

i need help when i used this script the bus stuck in Blueberry and not run
Heres the Link of the FS: https://sampforum.blast.hk/showthread.php?tid=275695
i already put this on my OnPlayerSpawn
PHP код:
if(IsPlayerNPC(playerid))
    {
        new 
npcname[MAX_PLAYER_NAME];
        
GetPlayerName(playeridnpcnamesizeof(npcname));
        if(!
strcmp(npcname"Bus_Driver"true))
        {
            
PutPlayerInVehicle(playeridBusDriverVehicle0);
        }
        if(!
strcmp(npcname"Bus_Driver2"true))
        {
               
PutPlayerInVehicle(playeridBusDriverVehicle20);
              return 
1;
        }
        return 
1;
    } 
and this on my OnGameModInit
PHP код:
ConnectNPC("Bus_Driver","bus");
    
BusDriverVehicle CreateVehicle(4370.00.05.00.033, -1);
    
ConnectNPC("Bus_Driver2","bus2");
    
BusDriverVehicle2 CreateVehicle(4370.00.05.00.033, -1
My Problem is the blue bus and black bus is always stuck in blueberry
thanks in advance
Reply
#2

your drivers probably disconected put a print function in on the npc disconect to return their name if they crash to check
Reply
#3

sorry but i dont know how im new in scripting
Reply
#4

pawn Код:
if(IsPlayerNPC(playerid))
    {
        new npcname[MAX_PLAYER_NAME];
        GetPlayerName(playerid, npcname, sizeof(npcname));
        if(!strcmp(npcname, "Bus_Driver", true))
        {
            printf("npc spawned");
            PutPlayerInVehicle(playerid, BusDriverVehicle, 0);
        }
        if(!strcmp(npcname, "Bus_Driver2", true))
        {
               printf("npc spawned");
               PutPlayerInVehicle(playerid, BusDriverVehicle2, 0);
              return 1;
        }
        return 1;
    }
that will show if they actualy spawn in the first place
pawn Код:
public OnPlayerDisconnect(playerid, reason)
{
    if(IsPlayerNPC(playerid))
    {
        new npcname[MAX_PLAYER_NAME];
        GetPlayerName(playerid, npcname, sizeof(npcname));
        if(!strcmp(npcname, "Bus_Driver", true))
        {
               printf("npc crashed");
        }
        if(!strcmp(npcname, "Bus_Driver2", true))
        {
               printf("npc crashed");
        }
        return 1;
    }
}
that should show if they crashed
Reply
#5

Bro thanks for your time and for the quick reply
but i think the bus driver is not crash or DC coz i check the server logs and find the printf NPC Crashed and there is nothing like that

but my bus always spawn at blueberry >,<
Reply
#6

upp..
Reply
#7

upp please same problem !
Reply
#8

up !
Reply
#9

Quote:
Originally Posted by Arpatos
Посмотреть сообщение
upp please same problem !
yah help us please ....
Reply
#10

upp again ...
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)