27.05.2012, 18:33
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.
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.
Anything else can be solved by debugging a lot of the code, good luck.
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);
}
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);
}