14.05.2017, 19:59
heeello guys, i'll try to write it short as i can.
i'll inform you, that i will make few mistakes in my "english", so...
i need help with taking the coords from player to car.
i think, that that's the problem.
i'll inform you, that i will make few mistakes in my "english", so...
i need help with taking the coords from player to car.
i think, that that's the problem.
Код HTML:
CMD:krauti(playerid)
{
new randomSk;
new msg[128];
new Float:vehx, Float:vehy, Float:vehz;
new Float:distance = GetVehicleDistanceFromPoint(meddzip[0]|| meddzip[1]|| meddzip[2]||meddzip[3], vehx, vehy, vehz);
//if(!PlayerToPoint(2, playerid, -1770.6323, 2415.2854, 80.5659)) return SendClientMessage(playerid,Raudona, "* Љalia jūsų nėra malkų kurias galima pakrauti.");
if(playerDB[playerid][nupjove]<10)
{
format(msg,sizeof(msg),"* Galima neљti nupjovus visas malkas.");
SendClientMessage(playerid, Zalia, msg);
}
if(playerDB[playerid][pakrove]>10)
{
format(msg,sizeof(msg),"* Jau pakrauta.");
SendClientMessage(playerid, Zalia, msg);
}
if(PlayerToPoint(2, playerid, -1770.6323, 2415.2854, 80.5659))
{
randomSk = randomNumb(1, 11);
ApplyAnimation(playerid,"CARRY","crry_prtial",4.1,1,1,1,1,1,1);
playerDB[playerid][nesa]+=randomSk;
SetPlayerAttachedObject(playerid, 1, 19793, 1, 0.002953, 0.469660, -0.009797, 269.851104, 88.443557, 0.000000, 0.804894, 1.000000, 0.822361);
}
if(distance <=3 && playerDB[playerid][nesa]>0)
{
format(msg,sizeof(msg),"* Padėjote %i malkas.",playerDB[playerid][nesa]);
SendClientMessage(playerid, Zalia, msg);
playerDB[playerid][nupjove]-=playerDB[playerid][nesa];
playerDB[playerid][pakrove]+=playerDB[playerid][nesa];
}
return 1;
}

