Interior problem
#1

This command should put me on pos and int
PHP код:
CMD:enter(playerid)
{
    new 
org;
    if(
IsPlayerInRangeOfPoint(playerid2.0OrgInfo[org][oExitX], OrgInfo[org][oExitY], OrgInfo[org][oExitZ]))
    {
        
SPP(playeridOrgInfo[org][oIntX], OrgInfo[org][oIntY], OrgInfo[org][oIntZ]);
        
SetPlayerInterior(playeridOrgInfo[org][oInt]);
        
SetPlayerVirtualWorld(playeridOrgInfo[org][oVW]);
        return 
1;
    }
    return 
1;

Position is working.. But my int is still 0. Int is saved in DB and everything is loaded but it won't set my int.. Any ideas?
Reply
#2

I made command to set interior but sometimes it will sometimes it won't set it..
Reply
#3

pawn Код:
if(IsPlayerInRangeOfPoint(playerid, 2.0, OrgInfo[org][oExitX], OrgInfo[org][oExitY], OrgInfo[org][oExitZ]))
What is the [org]? How & where is it defined?

Please also show us the enumerator that you use for OrgInfo
Reply
#4

Rly man?? I am saying about interior.. SOmetimes it won't set my int sometimes it will..
Reply
#5

Quote:
Originally Posted by Micko123
Посмотреть сообщение
Rly man?? I am saying about interior.. SOmetimes it won't set my int sometimes it will..
Sorry I didnt see the new on top.

The problem is quite simple (atleast I think thats the problem)

When you type "/enter" it should teleport you inside a organization that you are near? Like standing on an icon and such.

When you do
pawn Код:
new org;
    if(IsPlayerInRangeOfPoint(playerid, 2.0, OrgInfo[org][oExitX], OrgInfo[org][oExitY], OrgInfo[org][oExitZ]))
org will be 0 by default and it will not really detect the organization you are attempting to enter, more like it will inherit the interior ID of the ID:0 organization. Therefore as I said above, post more of your code, we need to see how you actually create those organizations and how do you put them together. We cannot just judge based on "IsPlayerInRangeOfPoint".

Also what is SPP?
Reply
#6

Okay so..
SPP - setplayerpos
Org is stored in MySQL DB and ID starts from 1 not from 0 so that is fixed.. Problem is INTERIOR
I made command /int [ID] and it should set my interior. But when I type /int 15 my int is still 0. It is not changing. But sometimes it does.. I am confuseeeeeed
Reply
#7

Add this into your command and go around try to enter few interios and post the results and tell us if they are correct or not

pawn Код:
printf("Entering Organization: %i", org);
printf("Entering interior: %i",OrgInfo[org][oInt]);
print("___________________");
Reply
#8

I also added to give player interior in debug. Here is the result
PHP код:
[19:33:23Entering Organization1
[19:33:23Entering interior1
[19:33:23Player interior0
[19:33:23___________________ 
And I also changed command
PHP код:
CMD:enter(playerid)
{
    new 
org;
    if(
IsPlayerInRangeOfPoint(playerid2.0OrgInfo[org][oExitX], OrgInfo[org][oExitY], OrgInfo[org][oExitZ]))
    {
        
GetPlayerInterior(playerid);
        
SetPlayerInterior(playerid1);
        
GetPlayerVirtualWorld(playerid);
        
SetPlayerVirtualWorld(playeridOrgInfo[org][oVW]);
        
SPP(playeridOrgInfo[org][oIntX], OrgInfo[org][oIntY], OrgInfo[org][oIntZ]);
        
printf("Entering Organization: %i"OrgInfo[org][oID]);
        
printf("Entering interior: %i",OrgInfo[org][oInt]);
        
printf("Player interior: %d"GetPlayerInterior(playerid));
        print(
"___________________");
    }
    return 
1;

I put SetPlayerInterior(playerid, 1);
But it is still 0..
Reply
#9

-FIXED!-
Problem vas ******. When I turn on ****** it won't set my int properly..
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)