16.12.2014, 07:03
Quote:
I think I have better way to do it:
Код:
public OnTrailerUpdate(playerid, vehicleid) { for(new x, y = MAX_VEHICLES; x < y; x++) { if(IsTrailerAttachedToVehicle(x) && GetVehicleTrailer(x) == vehicleid)) { //trailer is attached return 1; } } //trailer not attached return 1; } |
pawn Код:
forward OnTrailerUpdate(playerid, vehicleid);
public OnTrailerUpdate(playerid, vehicleid)
{
for(new x, y = MAX_VEHICLES; x < y; x++)
{
if(IsTrailerAttachedToVehicle[x] && GetVehicleTrailer[x] == vehicleid))
{
return 1;
}
}
DestroyVehicle(trucker[playerid]);
return 1;
}
pawn Код:
C: x(2328) : error 028: invalid subscript (not an array or too many subscripts): "IsTrailerAttachedToVehicle"
C: x(2328) : warning 215: expression has no effect
C: x(2328) : error 001: expected token: ";", but found "]"
C: x(2328) : error 029: invalid expression, assumed zero
C: x(2328) : fatal error 107: too many error messages on one line