I need some help with Capasity
#1

Well , i use larp absed gm. I want to upgrade trucker job. I made new trucks with capasity , but these new trucks dont work. They work like they dont have limit or something , just capasity dont work for them.

Код:
enum pHaul
{
	pCapasity,
	pLoad,
    pFishLoad,
};

new PlayerHaul[113][pHaul];

then i have question what that 113 mean ?
These i added under public OnGameModeInit()

Код:
 
    they were before:

    PlayerHaul[108][pCapasity] = 100;
    PlayerHaul[109][pCapasity] = 100;
	PlayerHaul[110][pCapasity] = 50;
	PlayerHaul[111][pCapasity] = 50;
	
     These i added myself
    PlayerHaul[197][pCapasity] = 50;//
	PlayerHaul[198][pCapasity] = 50;//
	PlayerHaul[199][pCapasity] = 50;//
	PlayerHaul[200][pCapasity] = 50;//
Код:
These are trucks:
AddStaticVehicleEx(403,836.2901,-1273.2012,14.7726,268.3700,-1,-1,30000); // truck1 197
AddStaticVehicleEx(435,818.3604,-1273.7546,14.6400,269.7902,-1,-1,30000); // trucktrailer1 198
AddStaticVehicleEx(515,875.8115,-1302.2493,14.7638,91.3146,-1,-1,30000); // Truck2 199
AddStaticVehicleEx(435,903.9710,-1301.8632,14.6387,90.5989,-1,-1,30000); // Truck 2 trailer 200
I use these with command /buyload
Код:
 if(PlayerHaul[tmpcar][pFishLoad] < PlayerHaul[tmpcar][pCapasity])
But Capasity dont work , you can buy with no limit :S
mabye anyone can help me ?


Reply
#2

Sorry for bump , but i want to get it work soon , please help
Reply
#3

Try this (Not Tested):

pawn Код:
enum pHaul
{
pCapasity,
pLoad,
pFishLoad,
};

new PlayerHaul[120][pHaul];
And, in OnGameModeInit:
pawn Код:
PlayerHaul[108][pCapasity] = 100;
PlayerHaul[109][pCapasity] = 100;
PlayerHaul[110][pCapasity] = 50;
PlayerHaul[111][pCapasity] = 50;

PlayerHaul[112][pCapasity] = 50;//
PlayerHaul[113][pCapasity] = 50;//
PlayerHaul[114][pCapasity] = 50;//
PlayerHaul[115][pCapasity] = 50;//
Reply
#4

Quote:
Originally Posted by © Tђэ LυxυяiσN™
Try this (Not Tested):

pawn Код:
enum pHaul
{
pCapasity,
pLoad,
pFishLoad,
};

new PlayerHaul[120][pHaul];
And, in OnGameModeInit:
pawn Код:
PlayerHaul[108][pCapasity] = 100;
PlayerHaul[109][pCapasity] = 100;
PlayerHaul[110][pCapasity] = 50;
PlayerHaul[111][pCapasity] = 50;

PlayerHaul[112][pCapasity] = 50;//
PlayerHaul[113][pCapasity] = 50;//
PlayerHaul[114][pCapasity] = 50;//
PlayerHaul[115][pCapasity] = 50;//
Dont work ;S
PlayerHaul[112][pCapasity] = 50;//
this 112 there must be car id. If i put car ids and all and keep new PlayerHaul[113][pHaul]; it tell error 032: array index out of bounds (variable "PlayerHaul"). I need to set it 200.

i have tryed it with many ways but i dont get this system work :S i dont have even any ideas to try anymore.
Reply
#5

Ok i made it already with antoher way . Tnx for answering anyway.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)