SA-MP Forums Archive
Bug with House Enter - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: Bug with House Enter (/showthread.php?tid=350507)



Bug with House Enter - ivanVU - 12.06.2012

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;
}
}



Re: Bug with House Enter - milanosie - 12.06.2012

Aren't x, y and z Floats instead of integers?


Re: Bug with House Enter - ivanVU - 12.06.2012

Quote:
Originally Posted by milanosie
Посмотреть сообщение
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 !!


Re: Bug with House Enter - milanosie - 12.06.2012

Quote:
Originally Posted by ivanVU
Посмотреть сообщение
I don't get it, what do you mean?

EDIT: I get it now, i'll try

EDIT #2: Thank you, solved !!
No Problem