09.02.2016, 01:42
Como eu faзo para verificar se o player esta no chao ?
:
.
|
Vocк teria que instalar o plugin MapAndreas e verificar a equivalкncia aproximada entre a coordenada Z do jogador e a coordenada Z da superfнcie do local em que ele estivesse
:https://sampforum.blast.hk/showthread.php?tid=275492 Espero ter ajudado . |
printf("Coordenada z: %f", GetPointZPos(x, y));
new Float:cordZ;
GetPointZPos(x, y, cordZ);
if(GetPlayerSpeed(playerid) > 100)
{
printf("%s foi kickado do servidor. | Motivo: Speed Hack.", GetandoNome(playerid));
Kick(playerid);
}
stock GetPlayerSpeed(playerid)
{
new Float:xPos[3];
GetPlayerVelocity(playerid, xPos[0], xPos[1], xPos[2]);
return floatround(floatsqroot(xPos[0] * xPos[0] + xPos[1] * xPos[1] + xPos[2] * xPos[2]) * 170.00);
}
|
O motivo de eu querer verificar, e que estou desenvolvendo um ant speed hack, que ele funfa de boas, porem quando recebe supertapa, ou esta caindo de algum prйdio o ant xiter detecta como se fosse speed hack, veja so.
Funзгo do xiter: correr a pй em alta velocidade. Код:
if(GetPlayerSpeed(playerid) > 100)
{
printf("%s foi kickado do servidor. | Motivo: Speed Hack.", GetandoNome(playerid));
Kick(playerid);
}
Код:
stock GetPlayerSpeed(playerid)
{
new Float:xPos[3];
GetPlayerVelocity(playerid, xPos[0], xPos[1], xPos[2]);
return floatround(floatsqroot(xPos[0] * xPos[0] + xPos[1] * xPos[1] + xPos[2] * xPos[2]) * 170.00);
}
|
stock GetPlayerSpeed(playerid)
{
new Float:xPos[3];
GetPlayerVelocity(playerid, xPos[0], xPos[1], xPos[2]);
return floatround(floatsqroot(xPos[0] * xPos[0] + xPos[1] * xPos[1]) * 170.00);
}