Trunk system.
#6

One thing, you don't need a string size of 256 for a clientmessage, messages have the max size of 128, and 256 is a waste of memory.

About the TrunkXY you are doing this.
pawn Code:
stock TrunkXY(playerid, &Float:x2, &Float:y2, Float:distance)
{
    new Float:a;
    GetPlayerPos(playerid, x2, y2, a);
    GetPlayerFacingAngle(playerid, a);
    if(GetPlayerVehicleID(playerid))
    {
        GetVehicleZAngle(GetPlayerVehicleID(playerid), a);
    }
    x2 += (distance * floatsin(-a+180, degrees));
    y2 += (distance * floatcos(-a+180, degrees));
   
    SetPlayerCheckpoint(playerid, x2, y2, a, 1.0);
}
I'm not sure if this is causing a problem, but the Z position of the checkpoint will always be the angle the player is facing. That means if the player is on Mount Chilliad, then the checkpoint might appear like a million feet underground. Just add a z float like so.
pawn Code:
stock TrunkXY(playerid, &Float:x2, &Float:y2, Float:distance)
{
    new
        Float:a,
        Float:z
    ;
    GetPlayerPos(playerid, x2, y2, z);
    GetPlayerFacingAngle(playerid, a);
    if(GetPlayerVehicleID(playerid))
    {
        GetVehicleZAngle(GetPlayerVehicleID(playerid), a);
    }
    x2 += (distance * floatsin(-a+180, degrees));
    y2 += (distance * floatcos(-a+180, degrees));

    SetPlayerCheckpoint(playerid, x2, y2, z, 1.0);
}
Anything else can be solved by debugging a lot of the code, good luck.
Reply


Messages In This Thread
Checkpoint help - by iGetty - 27.05.2012, 16:22
Re: Trunk system. - by vvhy - 27.05.2012, 17:18
Re: Trunk system. - by iGetty - 27.05.2012, 17:40
Re: Trunk system. - by saiberfun - 27.05.2012, 17:48
Re: Trunk system. - by iGetty - 27.05.2012, 18:02
Re: Trunk system. - by ReneG - 27.05.2012, 18:33
Re: Trunk system. - by iGetty - 27.05.2012, 18:41
Re: Trunk system. - by iGetty - 27.05.2012, 18:57
Re: Trunk system. - by ReneG - 27.05.2012, 19:08
Re: Trunk system. - by iGetty - 27.05.2012, 19:13

Forum Jump:


Users browsing this thread: 2 Guest(s)