Help? - 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: Help? (
/showthread.php?tid=615857)
Help? -
Micko123 - 28.08.2016
Hey guys. I have this problem on house system. When i create house it works fine and everything is created as it should. Then i buy house and it sends me to interior and that is fine too. But i can't get out of house. I can't exit it
PHP код:
if(IsPlayerInRangeOfPoint(playerid, 3.0, KucaInfo[i][kIzlazX], KucaInfo[i][kIzlazY], KucaInfo[i][kIzlazZ]) && GetPlayerVirtualWorld(playerid) == KucaInfo[i][kVW])
{
SetPlayerPos(playerid, KucaInfo[i][kUlazX], KucaInfo[i][kUlazY], KucaInfo[i][kUlazZ]);
SetPlayerInterior(playerid, 0);
SetPlayerVirtualWorld(playerid, 0);
}
There it is. When i am on exit coords it should spawn me on enter coords. I have no idea what is wrong
__________________
Re: Help? -
DeeadPool - 28.08.2016
Can you show the whole script ( from where you enter till you exit.) then I can help you.
Re: Help? -
Micko123 - 28.08.2016
PHP код:
if(newkeys == KEY_SECONDARY_ATTACK )
{
for(new i; i < MAX_KUCA; i++)
{
if(IsPlayerInRangeOfPoint(playerid, 3.0, KucaInfo[i][kUlazX], KucaInfo[i][kUlazY], KucaInfo[i][kUlazZ]))
{
if(PlayerInfo[playerid][PosedovanjeKuce] == i || KucaInfo[i][kZatvoreno] == 0)
{
SetPlayerVirtualWorld(playerid, KucaInfo[i][kVW]);
SetPlayerInterior(playerid, KucaInfo[i][kInt]);
SetPlayerPos(playerid, KucaInfo[i][kIzlazX], KucaInfo[i][kIzlazY], KucaInfo[i][kIzlazZ]);
}
else return ERROR(playerid, "Kuca je zakljucana!");
}
if(IsPlayerInRangeOfPoint(playerid, 3.0, KucaInfo[i][kIzlazX], KucaInfo[i][kIzlazY], KucaInfo[i][kIzlazZ]) && GetPlayerVirtualWorld(playerid) == KucaInfo[i][kVW])
{
SetPlayerInterior(playerid, 0);
SetPlayerVirtualWorld(playerid, 0);
SetPlayerPos(playerid, KucaInfo[i][kUlazX], KucaInfo[i][kUlazY], KucaInfo[i][kUlazZ]);
}
}
}
This??
Re: Help? -
Micko123 - 28.08.2016
Bump?