14.09.2009, 17:09
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:
And this is how my factioncar system looks like...
And i want that if i enter in any of those Trucks[i] it does this:
I hope you understand me? Tell me if not, ill try to explain more.
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; |
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 |
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