PDA

View Full Version : Bug with House Enter


ivanVU
12/06/2012, 08:43 PM
I have bug, I can't get in to house, please help me.


public OnPlayerKeyStateChange(playerid, newkeys, oldkeys)
{
if( newkeys == KEY_SECONDARY_ATTACK ) // ULAZ
{
new x,y,z,int,ww,xa,ya,za;
for(new k = 0; k <= max_kuca; k++)
{
x = InfoKuce[k][IntXKuce];
y = InfoKuce[k][IntYKuce];
z = InfoKuce[k][IntZKuce];
xa = InfoKuce[k][IzlazXKuce];
ya = InfoKuce[k][IzlazYKuce];
za = InfoKuce[k][IzlazZKuce];
int = InfoKuce[k][IntIDKuce];
ww = InfoKuce[k][VWKuce];

if(IsPlayerInRangeOfPoint(playerid, 2.0, xa, ya, za))
{
if(strcmp(InfoKuce[k][VlasnikKuce],Ime(playerid), false ) == 0)
{
SetPlayerPos(playerid,x,y,z);
SetPlayerInterior(playerid,int);
SetPlayerVirtualWorld(playerid,ww);
GameTextForPlayer( playerid, "Kuca", 3000, 1 ); // Salje igracu nekakvu poruku
}
}

else if(IsPlayerInRangeOfPoint(playerid, 2.0, x, y, z))
{
if(strcmp(InfoKuce[k][VlasnikKuce],Ime(playerid), false ) == 0)
{
SetPlayerPos(playerid,xa,ya,za);
SetPlayerInterior(playerid,0);
SetPlayerVirtualWorld(playerid,0);
GameTextForPlayer( playerid, "Bay Side", 3000, 1 ); // Salje igracu nekakvu poruku
}
}
}
return true;
}
}

milanosie
12/06/2012, 08:44 PM
Aren't x, y and z Floats instead of integers?

ivanVU
12/06/2012, 09:07 PM
Aren't x, y and z Floats instead of integers?

I don't get it, what do you mean?

EDIT: I get it now, i'll try

EDIT #2: Thank you, solved !! ;)

milanosie
12/06/2012, 10:06 PM
I don't get it, what do you mean?

EDIT: I get it now, i'll try

EDIT #2: Thank you, solved !! ;)

No Problem :)