.:[HELP]:. .:[Explain me the meaning of this please]:.
#1

Hi.


I changed the IsATruck function to Factioncar[0], Factioncar[1] etc etc. Now i need to change this to mine Factioncar[i] compatile...

This what i need to change:
Quote:

new PlayerHaul[100][pHaul];

Quote:

OnGameModeInit
PlayerHaul[78][pCapasity] = 100;
PlayerHaul[79][pCapasity] = 100;
PlayerHaul[80][pCapasity] = 50;
PlayerHaul[81][pCapasity] = 50;

And this is how my factioncar system looks like...

Quote:

new Trucks[4];

public IsATruck(vehicleid)
{
new TruckCarFound = 0;
for(new i = 0; i < sizeof(Trucks); i++)
{
if (vehicleid == Trucks[i])
{
TruckCarFound = 1;
}
}
if(TruckCarFound == 0)
{
return 1;
}
return 0;
}



Trucks[0] = CreateVehicle(456,2795.2,-2417.8,13.4,90.8,-1,-1,800);//Component Truck
Trucks[1] = CreateVehicle(456,2783.9,-2417.9,13.4,90.8,-1,-1,800);//Component Truck
Trucks[2] = CreateVehicle(440,2794.1,-2455.9,13.4,90.8,-1,-1,800);//Component Truck
Trucks[3] = CreateVehicle(440,2782.9,-2455.6,13.4,90.8,-1,-1,800);//Component Truck

And i want that if i enter in any of those Trucks[i] it does this:

pawn Код:
if(!IsATruck(vehicleId))
        {
            if(PlayerInfo[playerid][pMember] == 11 || PlayerInfo[playerid][pLeader] == 11)
            {
                format(string, sizeof(string), "Products: %d/%d", PlayerHaul[newcar][pLoad],PlayerHaul[newcar][pCapasity]);
                SendClientMessage(playerid, COLOR_WHITE, string);
                SendClientMessage(playerid, COLOR_WHITE, "INFO: You can deliver Products to Businesses.");
                SendClientMessage(playerid, COLOR_WHITE, "INFO: Commands are /load /buyprods /sellprods");
            }
            else
            {
              RemovePlayerFromVehicle(playerid);
              SendClientMessage(playerid, COLOR_GREY, " You are not Ferrington's member!");
            }
        }

But it says i have : Products 0/0 but it should be 0/50 or 0/100
I hope you understand me? Tell me if not, ill try to explain more.
Reply
#2

pawn Код:
stock IsATruck(vehicleid)
{
  for(new i = 0; i < sizeof(Trucks); i++)
  {
    if(Trucks[i] == vehicleid)
    {
      return true;
    }
  }
  return false;
}
pawn Код:
if(!IsATruck(vehicleId))
{
  if(PlayerInfo[playerid][pMember] == 11 || PlayerInfo[playerid][pLeader] == 11)
  {
    format(string, sizeof(string), "Products: %d/%d", PlayerHaul[newcar][pLoad], PlayerHaul[newcar][pCapasity]);
    SendClientMessage(playerid, COLOR_WHITE, string);
    SendClientMessage(playerid, COLOR_WHITE, "INFO: You can deliver Products to Businesses.");
    SendClientMessage(playerid, COLOR_WHITE, "INFO: Commands are /load /buyprods /sellprods");
  }
  else
  {
    RemovePlayerFromVehicle(playerid);
    SendClientMessage(playerid, COLOR_GREY, " You are not Ferrington's member!");
  }
}
Reply
#3

Ask in The Godfather topic!
Reply
#4


No you didnt understand me right..

I need to change only these:


Quote:

new PlayerHaul[100][pHaul];

OnGameModeInit
PlayerHaul[78][pCapasity] = 100;
PlayerHaul[79][pCapasity] = 100;
PlayerHaul[80][pCapasity] = 50;
PlayerHaul[81][pCapasity] = 50;

To something, that it will recognize them to trucks...

Or can someone atleast explain me what means new PlayerHaul[100][pHaul]; that "100"? CarID i suppouse...

Dont need to solve this, just help me to understand this please..
Reply
#5

Please help? ..
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)