22.01.2011, 16:53
I'm wanting to make a structure, like this:
And there I'd do a enum with the info, + a variable:
And on player file had to be the ID that he owns !
I'm a bit lazy today lol. I mean: I want something to create a ID, from 0 until 300
It will create the first one as ID: 0. The next one 1, the next 2. It's like checking the last created ID, and adding +1
Sorry if anyone understood lol.
pawn Код:
#undef MAX_VEHICLES
#define MAX_VEHICLES 300
pawn Код:
if(!strcmp(cmdtext, "/buy", true))
{
// If player is on a vehicle and if it's not bought already, he can buy this one. And a ID will be set for the vehicle
// I know how to do, just lazy for show the full code example ^
return 1;
}
pawn Код:
enum vInfo
{
id,
}
new vehicles[MAX_VEHICLES][vInfo];
Код:
NAME: THE_RUNNER ID: ID_HERE
It will create the first one as ID: 0. The next one 1, the next 2. It's like checking the last created ID, and adding +1
Sorry if anyone understood lol.