12.01.2018, 12:56
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.
EDIT: Plus, what integer type I should put for retrieved or writing data? How can I know that?
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 код:
hook OnOutcomingRPC(playerid, rpcid, BitStream:bs)
{
if(rpcid == 164)
{
new Float:x,
Float:y,
Float:z,
Float:angle,
vehicleid,
modelid,
respawn_time,
color1,
color2,
siren;
BS_ReadValue(bs,
PR_UINT16, vehicleid,
PR_UINT16, modelid,
PR_FLOAT, x,
PR_FLOAT, y,
PR_FLOAT, z,
PR_FLOAT, angle,
PR_UINT16, respawn_time,
PR_UINT16, siren,
PR_UINT16, color1,
PR_UINT16, color2);
BS_ResetReadPointer(bs);
SCMF(playerid, -1, "%i & %i & %f & %f & %f & %f & %i & %i & %i & %i", vehicleid,
modelid,
x,
y,
z,
angle,
respawn_time,
siren,
color1,
color2);
}
return Y_HOOKS_CONTINUE_RETURN_1;
}
Код:
[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