21.04.2010, 23:24
Hello - I'm having a little problem here.
I'm having this script, where you can buy an apartment.
Then you simply type /aexit to exit the apartment.
On the first floor, it works perfectly, but there's no respond when you type /aexit on the second floor.
My thought is, that it might be somewhere between the first case (level one) and the second case (level two).
I have my reasons to think that it has something to do with the else - but im not quite sure.
I've been trying to modify it a bit, but im not really sure what it could be changed to?
I know you can't see the whole code, but that would be huge
.
But as i said, the first level works - but not the second.
I hope anyone could help me out here.
Thanks![smiley](images/smilies/smile.gif)
I'm having this script, where you can buy an apartment.
Then you simply type /aexit to exit the apartment.
On the first floor, it works perfectly, but there's no respond when you type /aexit on the second floor.
My thought is, that it might be somewhere between the first case (level one) and the second case (level two).
I have my reasons to think that it has something to do with the else - but im not quite sure.
I've been trying to modify it a bit, but im not really sure what it could be changed to?
I know you can't see the whole code, but that would be huge
![Smiley](images/smilies/smile.png)
But as i said, the first level works - but not the second.
I hope anyone could help me out here.
Thanks
![smiley](images/smilies/smile.gif)
Код:
dcmd_aexit(playerid,params[]) { #pragma unused params if(GetPlayerInterior(playerid)==playerinterior[playerid]) // LVL 1 { if(GetPlayerVirtualWorld(playerid)==68 || GetPlayerVirtualWorld(playerid)==69 || GetPlayerVirtualWorld(playerid)==70 || GetPlayerVirtualWorld(playerid)==71 || GetPlayerVirtualWorld(playerid)==72 || GetPlayerVirtualWorld(playerid)==73 || GetPlayerVirtualWorld(playerid)==74 || GetPlayerVirtualWorld(playerid)==75 || GetPlayerVirtualWorld(playerid)==76 || GetPlayerVirtualWorld(playerid)==77 || GetPlayerVirtualWorld(playerid)==78 || GetPlayerVirtualWorld(playerid)==79){ // CHECK FOR RODEO MOTEL LEVEL 1 SetPlayerPos(playerid, apartmentx, apartmenty, apartmentz); SetPlayerInterior(playerid, 15); SetPlayerVirtualWorld(playerid, 2); } } else if(GetPlayerInterior(playerid)==playerinterior[playerid]) // LVL 2 { if(GetPlayerVirtualWorld(playerid)==80 || GetPlayerVirtualWorld(playerid)==81 || GetPlayerVirtualWorld(playerid)==82 || GetPlayerVirtualWorld(playerid)==83 || GetPlayerVirtualWorld(playerid)==84 || GetPlayerVirtualWorld(playerid)==85 || GetPlayerVirtualWorld(playerid)==86 || GetPlayerVirtualWorld(playerid)==87 || GetPlayerVirtualWorld(playerid)==88 || GetPlayerVirtualWorld(playerid)==89 || GetPlayerVirtualWorld(playerid)==90 || GetPlayerVirtualWorld(playerid)==91){ // VIRTUAL WORLDS RODEO MOTEL LEVEL 2 SetPlayerPos(playerid, apartmentx, apartmenty, apartmentz); SetPlayerInterior(playerid, 15); SetPlayerVirtualWorld(playerid, 4); }} else { SendClientMessage(playerid, COLOR_BRIGHTRED, "You have not entered any apartment."); } return 1; }