03.08.2018, 21:37
Well I have this piece of code and it won't work ( that's why I'm posting this lol )
So va_print prints out "0.00000" for both
pawn Код:
hook OnPlayerKeyStateChange(playerid, newkeys, oldkeys)
{
//if(PRESSED(KEY_CTRL_BACK))
if(newkeys == KEY_CTRL_BACK)
{
new Float:Xa, Float:Ya, Float:Za;
GetVehiclePos(AdminVeh[playerid], Xa, Ya, Za);
va_print("%f player poz", GetPlayerPos(playerid, X_C, Y_C, Z_C));
va_print("%f veh poz", GetVehiclePos(AdminVozilo[playerid], Xa, Ya, Za));
if(!IsPlayerInAnyVehicle(playerid))
{
if(!IsPlayerInRangeOfPoint(playerid, 5, Xa, Ya, Za)) return SendClientMessage(playerid, -1, "nonoono");
else {
if(Uzo[playerid] == 1) {
if(GetVehicleModel(GetClosestVehicle(playerid) != 408)) return SCM(playerid, -1, "nahhh");
if(Kontova[playerid] == 15) return SCM(playerid, -1, "PRC");
RemovePlayerAttachedObject(playerid, djubr[playerid]);
SCM(playerid, -1, "Idite do drugog kontejnera");
if(Kontova[playerid] == -1) return Kontova[playerid] = 1;
Uzo[playerid] = 0;
Kontova[playerid] ++;
}
}
}
}
return 1;
}
PHP код:
if(!IsPlayerInRangeOfPoint(playerid, 5, Xa, Ya, Za)) return SendClientMessage(playerid, -1, "nonoono"); // this wont work