03.05.2010, 18:07
only and only map andreas, if u want to do it with area's good luck with speed and amount of code, just use this:
just an example
just an example
pawn Код:
IsPlayerInAir(playerid){
new Float:varx,Float:vary,Float:varz,Float:var1,Float:diff;
GetPlayerPos(playerid, varx, vary, varz);
MapAndreas_FindZ_For2DCoord(varx, vary, var1);
if(varz < var1){
diff = varz-var1;
if(diff > 5){
return 1;// player is in air
}else{
return 0;//player is on the ground
}
}else
if(varz => var1){
diff = var1-varz;
if(diff > 5){
return -1;// player is under ground
}else{
return 0;//player is on the ground
}
}
return 0;
}
