18.07.2010, 10:27
Hi guys
I made yesterday a 5 NPC's
Now I have 3 cab's
And I first wanted that you need to pay $200 for entering but then I saw on the forum a better idea of a ticket.
I made a command /buyticket that works
But when I bought it and entering a ticket it doenst say anything
And he also dont throw me out of the car when I don't have a ticket.
I have a feeling that he dont recognize the ID of the NPC car ID
MY NPC are like this:
ConnectNPC("Bustour1","bus1");
ConnectNPC("Bustour2","bus2");
ConnectNPC("Taxitour1","taxi1");
ConnectNPC("Taxitour2","taxi2");
ConnectNPC("Taxitour3","taxi3");
Bustour1Vehicle = CreateVehicle(437, 0.0, 0.0, 5.0, 0.0, 3, 3, 5000); //De positie van het voertuig maakt niet uit!
Bustour2Vehicle = CreateVehicle(437, 0.0, 0.0, 5.0, 0.0, 3, 3, 5000); //De positie van het voertuig maakt niet uit!
Taxitour1Vehicle = CreateVehicle(420, 0.0, 0.0, 5.0, 0.0, 3, 3, 5000); //De positie van het voertuig maakt niet uit!
Taxitour2Vehicle = CreateVehicle(420, 0.0, 0.0, 5.0, 0.0, 3, 3, 5000); //De positie van het voertuig maakt niet uit!
Taxitour3Vehicle = CreateVehicle(420, 0.0, 0.0, 5.0, 0.0, 3, 3, 5000); //De positie van het voertuig maakt niet uit!
I also tried in stead of car ID 420, Taxitour1/2/3vehicle
I made yesterday a 5 NPC's
Now I have 3 cab's
And I first wanted that you need to pay $200 for entering but then I saw on the forum a better idea of a ticket.
I made a command /buyticket that works
But when I bought it and entering a ticket it doenst say anything
And he also dont throw me out of the car when I don't have a ticket.
I have a feeling that he dont recognize the ID of the NPC car ID
MY NPC are like this:
ConnectNPC("Bustour1","bus1");
ConnectNPC("Bustour2","bus2");
ConnectNPC("Taxitour1","taxi1");
ConnectNPC("Taxitour2","taxi2");
ConnectNPC("Taxitour3","taxi3");
Bustour1Vehicle = CreateVehicle(437, 0.0, 0.0, 5.0, 0.0, 3, 3, 5000); //De positie van het voertuig maakt niet uit!
Bustour2Vehicle = CreateVehicle(437, 0.0, 0.0, 5.0, 0.0, 3, 3, 5000); //De positie van het voertuig maakt niet uit!
Taxitour1Vehicle = CreateVehicle(420, 0.0, 0.0, 5.0, 0.0, 3, 3, 5000); //De positie van het voertuig maakt niet uit!
Taxitour2Vehicle = CreateVehicle(420, 0.0, 0.0, 5.0, 0.0, 3, 3, 5000); //De positie van het voertuig maakt niet uit!
Taxitour3Vehicle = CreateVehicle(420, 0.0, 0.0, 5.0, 0.0, 3, 3, 5000); //De positie van het voertuig maakt niet uit!
I also tried in stead of car ID 420, Taxitour1/2/3vehicle
Код:
if(newstate == PLAYER_STATE_PASSENGER) { if(GetVehicleModel(GetPlayerVehicleID(playerid) == 420)) { if(cabticket[playerid] == 1) { cabticket[playerid] = 0;//takes the player ticket SendClientMessage(playerid,0xFFFF00AA,"Welcome sir!"); } else { SendClientMessage(playerid,0xFF0000AA,"You can not enter in cab sir, you have not a ticket!"); RemovePlayerFromVehicle(playerid); } } if(GetVehicleModel(GetPlayerVehicleID(playerid) == 420)) { if(cabticket[playerid] == 1) { cabticket[playerid] = 0;//takes the player ticket SendClientMessage(playerid,0xFFFF00AA,"Welcome sir!"); } else { SendClientMessage(playerid,0xFF0000AA,"You can not enter in cab sir, you have not a ticket!"); RemovePlayerFromVehicle(playerid); } } if(GetVehicleModel(GetPlayerVehicleID(playerid) == 420)) { if(cabticket[playerid] == 1) { cabticket[playerid] = 0;//takes the player ticket SendClientMessage(playerid,0xFFFF00AA,"Welcome sir!"); } else { SendClientMessage(playerid,0xFF0000AA,"You can not enter in cab sir, you have not a ticket!"); RemovePlayerFromVehicle(playerid); } } }