SA-MP Forums Archive
URGENT HELP, faction cars - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: URGENT HELP, faction cars (/showthread.php?tid=498022)



URGENT HELP, faction cars - ReD_HunTeR - 01.03.2014

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 ;(


Re: URGENT HELP, faction cars - Vasu99 - 01.03.2014

This might be helpful, I found it earlier today.

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


Re: URGENT HELP, faction cars - ReD_HunTeR - 01.03.2014

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