20.03.2013, 05:19
hello i want that when a player enters in these vehicles: BOTveh1, BOTveh2, BOTveh3. as passenger "g" he will have like this
i used this but it not work...
anyone can help..
pawn Код:
if(BoughtTicket[playerid] == 0)
{
SendClientMessage(playerid, COLOR_RED,"Buy plane ticket from terminal.");
new Float:x, Float:y, Float:z;
GetPlayerPos(playerid, x, y, z);
SetPlayerPos(playerid, x, y, z+1);
}
else
{
SendClientMessage(playerid, COLOR_YELLOW,"[Anak's Airways]: Welcome on flight sir - Your ticket is used.");
SendClientMessage(playerid, COLOR_WHITE,"Please exit plane when you reach your destination.");
BoughtTicket[playerid] = 0;
}
i used this but it not work...
pawn Код:
public OnPlayerEnterVehicle(playerid, vehicleid, ispassenger)
{
new vehicle;
vehicle = GetPlayerVehicleID(playerid);
if(vehicle == BOTveh1 || vehicle == BOTveh2 || vehicle == BOTveh3 && ispassenger == 0)
{
if(BoughtTicket[playerid] == 0)
{
SendClientMessage(playerid, COLOR_RED,"Buy plane ticket from terminal.");
new Float:x, Float:y, Float:z;
GetPlayerPos(playerid, x, y, z);
SetPlayerPos(playerid, x, y, z+1);
}
else
{
SendClientMessage(playerid, COLOR_YELLOW,"[Anak's Airways]: Welcome on flight sir - Your ticket is used.");
SendClientMessage(playerid, COLOR_WHITE,"Please exit plane when you reach your destination.");
BoughtTicket[playerid] = 0;
}
}
}
