14.11.2017, 19:43
Jelly, encontrei um bug. ao usar ShowPlayerForPlayer e RemovePlayerForPlayer, os jogadores ficam com skin do cj e tbm nгo aparecem os acessуrios e tals. como resolver isso?
stock SetPlayerSkinForPlayer(playerid, toplayerid, skin) { new BitStream:bs = BS_New(); BS_WriteValue( bs, PR_UINT16, playerid ); BS_SetWriteOffset(bs, skin); BS_RPC(bs, toplayerid, 153, PR_LOW_PRIORITY, PR_RELIABLE_ORDERED); BS_Delete(bs); return 1; }
Como fazer SetPlayerSkinForPlayer e SetPlayerAttachedObjectForPlayer?
Eu sou leigo nisso de raknet, tentei fazer mas nгo deu muito certo rs Код:
stock SetPlayerSkinForPlayer(playerid, toplayerid, skin) { new BitStream:bs = BS_New(); BS_WriteValue( bs, PR_UINT16, playerid ); BS_SetWriteOffset(bs, skin); BS_RPC(bs, toplayerid, 153, PR_LOW_PRIORITY, PR_RELIABLE_ORDERED); BS_Delete(bs); return 1; } |
SetPlayerAttObjForPlayer(playerid, toplayerid, index, modelid, bone, Float:fOffsetX = 0.0, Float:fOffsetY = 0.0, Float:fOffsetZ = 0.0, Float:fRotX = 0.0, Float:fRotY = 0.0, Float:fRotZ = 0.0, Float:fScaleX = 1.0, Float:fScaleY = 1.0, Float:fScaleZ = 1.0, materialcolor1 = 0, materialcolor2 = 0)
{
new BitStream:bs = BS_New();
BS_WriteValue(
bs,
PR_UINT16, playerid,
PR_UINT32, index,
PR_BOOL, 1,
PR_UINT32, modelid,
PR_UINT32, bone,
PR_FLOAT, fOffsetX,
PR_FLOAT, fOffsetY,
PR_FLOAT, fOffsetZ,
PR_FLOAT, fRotX,
PR_FLOAT, fRotY,
PR_FLOAT, fRotZ,
PR_FLOAT, fScaleX,
PR_FLOAT, fScaleY,
PR_FLOAT, fScaleZ,
PR_UINT32, materialcolor1,
PR_UINT32, materialcolor2
);
BS_RPC(bs, toplayerid, 113, PR_LOW_PRIORITY, PR_RELIABLE_ORDERED);
BS_Delete(bs);
return 1;
}
RemovePlayerAttObjForPlayer(playerid, toplayerid, index)
{
new BitStream:bs = BS_New();
BS_WriteValue(
bs,
PR_UINT16, playerid,
PR_UINT32, index,
PR_BOOL, 0
);
BS_RPC(bs, toplayerid, 113, PR_LOW_PRIORITY, PR_RELIABLE_ORDERED);
BS_Delete(bs);
return 1;
}
SetPlayerSkinForPlayer(playerid, forplayerid, skin)
{
new BitStream:bs = BS_New();
BS_WriteValue(
bs,
PR_UINT16, playerid,
PR_UINT32, skin
);
BS_RPC(bs, forplayerid, 153, PR_LOW_PRIORITY, PR_RELIABLE_ORDERED);
BS_Delete(bs);
return 1;
}
stock SetPlayerNameForPlayer(playerid, toplayerid, name[]) { new BitStream:bs = BS_New(); BS_WriteValue( bs, PR_UINT16, playerid, PR_UINT16, sizeof(name), PR_STRING, name, ); BS_RPC(bs, toplayerid, 11, PR_LOW_PRIORITY, PR_RELIABLE_ORDERED); BS_Delete(bs); return 1; }
Tentei fazer um SetPlayerNameForPlayer, fiz correto?
Код:
stock SetPlayerNameForPlayer(playerid, toplayerid, name[]) { new BitStream:bs = BS_New(); BS_WriteValue( bs, PR_UINT16, playerid, PR_UINT16, sizeof(name), PR_STRING, name, ); BS_RPC(bs, toplayerid, 11, PR_LOW_PRIORITY, PR_RELIABLE_ORDERED); BS_Delete(bs); return 1; } |
SetPlayerNameForPlayer(playerid, toplayerid, name[])
{
new BitStream:bs = BS_New(), size = strlen(name);
BS_WriteValue(
bs,
PR_UINT16, playerid,
PR_UINT8, size,
PR_STRING, name
);
BS_RPC(bs, toplayerid, 11);
BS_Delete(bs);
return 1;
}