How can i else better use it?
#1

Hello, i made a script for detecting in which vehicle the player
goes in. But i have a little problem, if i do 'If model not is ID 509 (Bike)'
then 'SendClientMessage : You don't have driving license' and if you enter
a helicopter, that not id 509 too, and i get that message too,, Here's my
script what can i better do?
Quote:

public OnPlayerEnterVehicle(playerid, vehicleid, ispassenger)
{
new model;
model = GetVehicleModel(vehicleid);
if(model != 509 && model != 481 && model != 510) {
if(pDLic[playerid] == 0) {
new Float:X, Float:Y, Float:Z;
GetPlayerPos(playerid, X, Y, Z);
SetPlayerPos(playerid, X, Y, Z);

SendClientMessage(playerid, COLOR_LRED, "** You don't have a driving license yet, please get your Driving license at the DMV.");
return 1;
}

}
if(model == 548 && model == 425 && model == 417 && model == 487 && model == 488 && model == 497 && model == 563 && model == 447 && model == 469) {
if(pFLic[playerid] == 0) {
new Float:X, Float:Y, Float:Z;
GetPlayerPos(playerid, X, Y, Z);
SetPlayerPos(playerid, X, Y, Z);

SendClientMessage(playerid, COLOR_LRED, "** You don't have a flying license yet, please get your Flying license at the DMV.");
return 1;
}
}
if(model == 472 && 473 && 493 && 595 && 484 && 430 && 453 && 452 && 446 && 454) {
if(pSLic[playerid] == 0) {
new Float:X, Float:Y, Float:Z;
GetPlayerPos(playerid, X, Y, Z);
SetPlayerPos(playerid, X, Y, Z);

SendClientMessage(playerid, COLOR_LRED, "** You don't have a sailing license yet, please get your Sailing license at the DMV.");
return 1;
}
}
return 1;
}


Reply
#2

Код:
public OnPlayerEnterVehicle(playerid, vehicleid, ispassenger)
{
  new model = GetVehicleModel(vehicleid);
  if(model != 509 || model != 481 || model != 510) {
   if(pDLic[playerid] == 0) {
     new Float:X, Float:Y, Float:Z;
     GetPlayerPos(playerid, X, Y, Z);
     SetPlayerPos(playerid, X, Y, Z);
     
     SendClientMessage(playerid, COLOR_LRED, "** You don't have a driving license yet, please get your Driving license at the DMV.");
      return 1;
   }

   }
  if(model == 548 || model == 425 || model == 417 || model == 487 || model == 488 || model == 497 || model == 563 || model == 447 || model == 469) {
   if(pFLic[playerid] == 0) {
     new Float:X, Float:Y, Float:Z;
     GetPlayerPos(playerid, X, Y, Z);
     SetPlayerPos(playerid, X, Y, Z);
     
     SendClientMessage(playerid, COLOR_LRED, "** You don't have a flying license yet, please get your Flying license at the DMV.");
      return 1;
   }
   }
   if(model == 472 || 473 || 493 || 595 || 484 || 430 || 453 || 452 || 446 || 454) {
    if(pSLic[playerid] == 0) {
     new Float:X, Float:Y, Float:Z;
     GetPlayerPos(playerid, X, Y, Z);
     SetPlayerPos(playerid, X, Y, Z);

      SendClientMessage(playerid, COLOR_LRED, "** You don't have a sailing license yet, please get your Sailing license at the DMV.");
      return 1;
     }
  }
   return 1;
}
Reply
#3

dont use onplayerenter vehicle

if u press enter to go in a vehicle and you dont actually go in it will send the message lol
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)