URGENT HELP, faction cars
#1

pawn Код:
public OnPlayerEnterVehicle(playerid, vehicleid)
{
   if(vehicleid == VFOPTIC[0] || VFOPTIC[1] || VFOPTIC[2] || VFOPTIC[3] || VFOPTIC[4] || VFOPTIC[5] || VFOPTIC[6] || VFOPTIC[7] || VFOPTIC[8] || VFOPTIC[9] || VFOPTIC[10] || VFOPTIC[11] || VFOPTIC[12] || VFOPTIC[13] || VFOPTIC[14] || VFOPTIC[15] || VFOPTIC[16] || VFOPTIC[17] || VFOPTIC[18] || VFOPTIC[19] || VFOPTIC[20] || VFOPTIC[21] || VFOPTIC[22] || VFOPTIC[23] || VFOPTIC[24])
   {
      if(PlayerInfo[playerid][pOptic] == 0)
      {
         RemovePlayerFromVehicleEx(playerid);
         SendClientMessage(playerid, COLOR_RED, "This Vehicle is belongs to "TEAM_ARMY_COL"Optic Members "COL_RED"and can't be used by Other Players.");
         return 0;
      }
   }
   if(vehicleid == VFMAFIA[0] || VFMAFIA[1] || VFMAFIA[2] || VFMAFIA[3] || VFMAFIA[4] || VFMAFIA[5] || VFMAFIA[6] || VFMAFIA[7] || VFMAFIA[8] || VFMAFIA[9] || VFMAFIA[10] || VFMAFIA[11])
   {
      if(PlayerInfo[playerid][pMafia] == 0)
      {
         RemovePlayerFromVehicleEx(playerid);
         SendClientMessage(playerid, COLOR_RED, "This Vehicle is belongs to "TEAM_TERRORIST_COL"Mafia Members "COL_RED"and can't be used by Other Players.");
         return 0;
      }
   }
   return 1;
}
it wanna do it for only VFOPTIC and VFMAFIA, but its doing for all other cars.. any body can fix, please fast ;(
Reply
#2

This might be helpful, I found it earlier today.

http://forum.sa-mp.com/showthread.ph...light=Roleplay
Reply
#3

Thanks Vasu, Because of that thread i got an idea in mind and its fixed
+REP
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)