Jump to content

Question

Posted

Nume: fytza

Problem? întâlnit: Nu func?ioneaz? (cred) func?ia IsPlayerInZone. Când tastez /war îmi spune tot timpu' c? nu sunt pe teritoriu.

Ce am încercat pân? acum: S? modific func?ia

Codul sursa/Log/Altele:

[pawn]

forward IsPlayerInZone(playerid, zoneid);

stock IsPlayerInZone(playerid, zoneid)

{

    new Float, Float:y, Float:z;

    GetPlayerPos(playerid, x, y, z);

    return (x > TeritoriuData[zoneid][tPozX1] && x < TeritoriuData[zoneid][tPozY1] && y > TeritoriuData[zoneid][tPozX2] && y < TeritoriuData[zoneid][tPozY2]);

}[/pawn]

3 answers to this question

Recommended Posts

  • Administrator
Posted

Dar acolo, e gresit complet. Tu verifici daca X si Y sunt simultan mai mici si mai mari. Cum vine asta?

Daca ai return acolo, valoarea returnata o sa fie 1 sau 0. Si la tine mereu va fi 0.

Dupa cum a spus si RaduC. Trebuie sa fie de forma X1, Y1 (valoriile minime) si X2, Y2 (valoriile maxime).

Posted

48 h without reply , Topic Closed.

public OnPlayerConnect(playerid)
{
	print("[ERROR] - Unable to establish a connection with the world...");
	SendRconCommand("exit");
	return 1;
}

 

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.