06.08.2018, 12:05
function AttachPet(playerid, bool: attach) {
if(PlayerInfo[playerid][pPet] != 0)
{
if(attach == true) {
PetObject[playerid] = SetPlayerAttachedObject( playerid, 2, 19079, 1, 0.328340, -0.082576, -0.147006, 0.000000, 0.000000, 0.000000, 0.648338, 0.671368, 0.725697 );
new L_STRING[100], Float:lnx_pLoc[3];
format(L_STRING, sizeof(L_STRING), "{F7F300}Lvl %d.\n{15D100}%s", PlayerInfo[playerid][pPet], PlayerInfo[playerid][pPetName]);
GetObjectPos(PetObject[playerid], lnx_pLoc[0], lnx_pLoc[1], lnx_pLoc[2]);
Pet3DText[playerid] = CreateDynamic3DTextLabel(L_STRING, 0xFFFFFFFF, lnx_pLoc[0], lnx_pLoc[1], lnx_pLoc[2], 20);
lnx_UpdateLabelPos(playerid);
}
else {
RemovePlayerAttachedObject(playerid, 2);
Delete3DTextLabel(Pet3DText[playerid]);
}
}
return 1;
}
Does not apper to players or playerid.
Any ideas why?
if(PlayerInfo[playerid][pPet] != 0)
{
if(attach == true) {
PetObject[playerid] = SetPlayerAttachedObject( playerid, 2, 19079, 1, 0.328340, -0.082576, -0.147006, 0.000000, 0.000000, 0.000000, 0.648338, 0.671368, 0.725697 );
new L_STRING[100], Float:lnx_pLoc[3];
format(L_STRING, sizeof(L_STRING), "{F7F300}Lvl %d.\n{15D100}%s", PlayerInfo[playerid][pPet], PlayerInfo[playerid][pPetName]);
GetObjectPos(PetObject[playerid], lnx_pLoc[0], lnx_pLoc[1], lnx_pLoc[2]);
Pet3DText[playerid] = CreateDynamic3DTextLabel(L_STRING, 0xFFFFFFFF, lnx_pLoc[0], lnx_pLoc[1], lnx_pLoc[2], 20);
lnx_UpdateLabelPos(playerid);
}
else {
RemovePlayerAttachedObject(playerid, 2);
Delete3DTextLabel(Pet3DText[playerid]);
}
}
return 1;
}
Does not apper to players or playerid.
Any ideas why?