help Required
#1

Hi Scripters, mappers, etc.

I got a problem.
  • When i attach an object to an object, the attached object's color is white, the textures are gone.
  • When i attach a camera to the object and set my player's pos to an interior, the camera also goes to that interior, all the things are in grey color BUT i can see objects like crane, etc
If u need the code , tell me and also tell me what was the THING which caused this error,...
Reply
#2

code plz
Reply
#3

pawn Код:
CMD:sub(playerid, params[])
{
    new Float:Pos[3], sub1, sub2;
    GetPlayerPos(playerid, Pos[0], Pos[1], Pos[2]);
    if(IsInSub[playerid] == false)
    {
        if(IsPlayerInWater(playerid))
        {
            IsInSub[playerid] = true;          
            sub1 = CreateObject(19300, Pos[0] , Pos[1], Pos[2], 0, 0, 0);
            sub2 = CreateObject(1612, 0, 0, 0, 0, 0, 0, 0.0);
            AttachObjectToObject(sub2, sub1 ,0, 0, 0 + 2, 0, 0, 0, 1);
            AttachCameraToObject(playerid, sub2);
            SetPlayerPos(playerid, Pos[0], Pos[0], Pos[2]);
            SetPlayerInterior(playerid, playerid * playerid + playerid + 3 ^ 2);
            ApplyAnimation(playerid, "LOWRIDER", "Sit_relaxed", 4.1, 1, 1, 1, 0, 0, 1);
        }
        else return SendClientMessage(playerid, -1, "Error: You Need To Be In Water To Use This Command");
    }
    return 1;
}
I'm gonna make a drivable submarine FS :P
Reply
#4

Bump...
Reply
#5

Quote:
Originally Posted by newbie scripter
Посмотреть сообщение
Bump...
......../././/,
Reply
#6

pawno seems fine
update your streamer sccanf and whirlpool
Reply
#7

Well first of all, when you set a player's interior, their camera is likely to follow. So in this situation, your best option is to probably use TogglePlayerSpectating. I haven't experimented with this, but my guess is that it would work.

pawn Код:
CMD:sub(playerid, params[])
{
    if(IsInSub[playerid] == false)
    {
        if(IsPlayerInWater(playerid))
        {
            new Float:Pos[3], sub1, sub2;
            GetPlayerPos(playerid, Pos[0], Pos[1], Pos[2]);
            IsInSub[playerid] = true;          
            sub1 = CreateObject(19300, Pos[0] , Pos[1], Pos[2], 0, 0, 0);
            sub2 = CreateObject(1612, 0, 0, 0, 0, 0, 0, 0.0);
            AttachObjectToObject(sub2, sub1 ,0, 0, 2, 0, 0, 0, 1);
            TogglePlayerSpectating(playerid, 1);
            AttachCameraToObject(playerid, sub2);
        }
        else return SendClientMessage(playerid, -1, "Error: You Need To Be In Water To Use This Command");
    }
    return 1;
}
This should work, but if it doesn't, let me know the results and I will edit the code accordingly. Also, to let you know, this will indeed affect any kind of 'suboff' commands, or anything similar that are used to get out of the submarine, so if you want to post that command here as well, I can edit it to fit with this command.
Reply
#8

We'll I found another error,

pawn Код:
SetPlayerPos(playerid, Pos[0], Pos[0], Pos[2]);
To

pawn Код:
SetPlayerPos(playerid, Pos[0], Pos[1], Pos[2]);
Reply
#9

Quote:
Originally Posted by J4mmyHD
Посмотреть сообщение
We'll I found another error,

pawn Код:
SetPlayerPos(playerid, Pos[0], Pos[0], Pos[2]);
To

pawn Код:
SetPlayerPos(playerid, Pos[0], Pos[1], Pos[2]);
I did that wanted to check whether my camera is al right :P
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)