Jump to content
  • 0

Problema stock


Mister

Question

Problema intalnita (descriere): am creat un stock sa vad care ar fi Fancy Angleul unui player pentru a se uita fix la un obiect, dar nu merge imi arata 0.00
Ero(area / rile) / warning-(ul / urile): nici una
Liniile de cod / sursa / script-ul(obligatoriu): 

stock Float:GetDistanceBetweenPoints(Float:x21,Float:y21,Float:z21,Float:x22,Float:y22,Float:z22)
{
	return floatsqroot(floatpower(floatabs(floatsub(x22,x21)),2)+floatpower(floatabs(floatsub(y22,y21)),2)+floatpower(floatabs(floatsub(z22,z21)),2));
}

stock Float:GetAngleP(playerid)
{
    new Float:X, Float:Y, Float:Z, Float:Ang,Float:a,Float:b, Float:x, Float:y, Float:z;
    GetObjectPos(Vehicul[0], X, Y, Z);
    GetObjectRot(Vehicul[0],a,b,Ang);
    GetPlayerPos(playerid,x,y,z);
	new Float:distance = GetDistanceBetweenPoints(X, Y, Z,x,y,z);
    GetObjectRot(PoolBall[0], a,b,Ang);
    X += (distance * floatsin(-Ang, degrees));
    Y += (distance * floatcos(-Ang, degrees));
    return Ang;
}

CMD:viewngle(playerid, params[])
{
	new string[120];
	format(string,sizeof(string),"Unghiul pentru a va uita la vehicul este %f",GetAngleP(playerid));
	SendClientMessage(playerid,-1,string);
	SetPlayerFacingAngle(playerid,GetAngleP(playerid));
	return 1;
}


Imagini / Video (optional):
Ati incercat sa rezolvati singur?:Da, poate se pricepe cineva mai bine ca mine sper, si ma poate ajuta

Edited by Mister

 

    __  ____      __           
   /  |/  (_)____/ /____  _____
  / /|_/ / / ___/ __/ _ \/ ___/
 / /  / / (__  ) /_/  __/ /    
/_/  /_/_/____/\__/\___/_/     
SERVICII SCRIPTING DE CALITATE
Pagina     Scripting     pawn
Link to comment
Share on other sites

1 answer to this question

Recommended Posts

Guest
This topic is now closed to further replies.
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue. For more details you can also review our Terms of Use and Privacy Policy.