12.01.2018, 13:46
Quote:
I'm trying to get "vehicles informations" by using this plugin.
This code result some crazy outputs, ahah. Only the vehicle's id and model id is valid. Any tips? I'm still learning how to use this plugin. PHP код:
Код:
[14:48:16] 1 & 411 & 0.000000 & 1826781696.000000 & 0.000000 & 0.000000 & 16069 & 257 & 20480 & 18243 [14:48:16] 2 & 560 & -0.000000 & -0.000000 & -0.000000 & 0.000000 & 16069 & 1027 & 16384 & 17692 [14:48:16] 3 & 416 & -0.000000 & 0.000000 & 0.000000 & 898666432.000000 & 17331 & 27181 & 32768 & 17595 [14:48:16] 4 & 411 & 0.000000 & 0.000000 & 0.000000 & 0.000000 & 16069 & 3946 & 16384 & 17948 [14:48:16] 5 & 411 & 1073741824.000000 & 0.000000 & 0.000000 & -0.000000 & 16671 & 0 & 32768 & 17595 [14:48:16] 6 & 411 & 964689920.000000 & 7398010.000000 & 0.438015 & -0.000000 & 17307 & 15765 & 32768 & 17595 [14:48:16] 7 & 411 & -0.000000 & 0.000000 & 8.391489 & 2.410292 & 16892 & 11140 & 0 & 17530 [14:48:16] 8 & 411 & -0.000000 & 0.000000 & 1.384874 & 0.000000 & 17326 & 9799 & 32768 & 17595 [14:48:16] 9 & 489 & 0.000000 & -0.000000 & -..*0.-,.,.000000 & 0.000000 & 17300 & 22317 & 32768 & 17595 [14:48:16] 10 & 490 & 0.000000 & 0.000000 & -0.000000 & 0.000000 & 17271 & 36176 & 32768 & 17595 [14:48:16] 11 & 490 & -14720.000000 & -0.000000 & -0.000000 & 0.000000 & 17311 & 5703 & 32768 & 17595 [14:48:16] 12 & 490 & -503808.000000 & -107882384.000000 & -0.000000 & -+''*-(+.(.000000 & 17123 & 31323 & 32768 & 17595 [14:48:16] 13 & 490 & ./,),(-*,(.000000 & 0.000000 & -0.000000 & -395793.906250 & 17035 & 10586 & 32768 & 17595 [14:48:16] 14 & 487 & -0.000000 & 0.000000 & -0.000000 & -0.000000 & 17326 & 35 & 32768 & 17595 [14:48:16] 15 & 520 & 0.000000 & 0.000000 & 0.000000 & 0.000000 & 17290 & 24143 & 16384 & 17948 [14:48:16] 16 & 551 & 0.000000 & -0.000000 & 0.000000 & -0.000000 & 17260 & 21552 & 32768 & 17595 |
PHP код:
hook OnOutcomingRPC(playerid, rpcid, BitStream:bs)
{
if(rpcid == 164)
{
new
Float:x,
Float:y,
Float:z,
Float:angle,
vehicleid,
modelid,
InteriorColor1,
InteriorColor2,
Float:health,
interior,
DoorDamageStatus,
PanelDamageStatus,
LightDamageStatus,
tireDamageStatus,
addsiren,
mods,
PaintJob,
BodyColor1,
BodyColor2;
BS_ReadValue(
bs,
PR_INT16, vehicleid,
PR_INT32, modelid,
PR_FLOAT, x,
PR_FLOAT, y,
PR_FLOAT, z,
PR_FLOAT, angle,
PR_INT8, InteriorColor1,
PR_INT8, InteriorColor2,
PR_FLOAT, health,
PR_INT8, interior,
PR_INT32, DoorDamageStatus,
PR_INT32, PanelDamageStatus,
PR_INT8, LightDamageStatus,
PR_INT8, tireDamageStatus,
PR_INT8, addsiren
);
printf("%i %i %f %f %f %f %i %i %f %i %i %i %i %i %i", vehicleid, modelid, x, y, z, angle, InteriorColor1, InteriorColor2, health, interior, DoorDamageStatus, PanelDamageStatus, LightDamageStatus, tireDamageStatus, addsiren);
for (new a = 0; a < 14; a++)
{
BS_ReadValue(bs, PR_INT8, mods);
printf("Mod Slot %i: %i",a, mods);
}
BS_ReadValue(
bs,
PR_INT8, PaintJob,
PR_INT32, BodyColor1,
PR_INT32, BodyColor2
);
printf("%i %i %i",PaintJob, BodyColor1, BodyColor2);
BS_ResetReadPointer(bs);
}
return Y_HOOKS_CONTINUE_RETURN_1;
}