Objects
#1

pawn Код:
CMD:spray(playerid, params[])
{
        new Float:X, Float:Y, Float:Z, Float:Angle;
        new myobject;
        GetPlayerPos(playerid, X, Y, Z);
        GetPlayerFacingAngle(playerid, Angle);
        myobject = CreateObject(1490, X, Y, Z+0.5, 0.0,0.0 , Angle, 100);
        return 1;
}
i cant get the object to create infront the player
Reply
#2

pawn Код:
CMD:spray(playerid, params[])
{
        new Float:X[MAX_PLAYERS], Float:Y[MAX_PLAYERS], Float:Z[MAX_PLAYERS], Float:Angle[MAX_PLAYERS];
        GetPlayerPos(playerid, X[playerid], Y[playerid], Z[playerid]);
        GetPlayerFacingAngle(playerid, Angle[playerid]);
        CreateObject(1490, X, Y, Z+0.5, 0.0,0.0 , Angle, 100);
        return 1;
}
Reply
#3

i get error did u test first anyone else?
Reply
#4

Try this
pawn Код:
CMD:spray(playerid, params[])
{
        new Float:X, Float:Y, Float:Z;
        new Angle;
        new myobject;
        GetPlayerPos(playerid, X, Y, Z);
        GetPlayerFacingAngle(playerid, Angle);
        myobject = CreateObject(1490, X, Y, Z+0.5, 0.0,0.0 , Angle, 100);
        return 1;
}
Reply
#5

pawn Код:
CMD:spray(playerid, params[])
{
        new Float:X, Float:Y, Float:Z, Float:Angle;
        GetPlayerPos(playerid, X, Y, Z);
        GetPlayerFacingAngle(playerid, Angle);
        CreateObject(1490, X, Y, Z+0.5, 0.0,0.0 , Angle-270, 100);
        return 1;
}
SOLVED LORDZ TAG MIS MATCH WITH ANGLE
Reply
#6

Quote:
Originally Posted by trapstar2020
Посмотреть сообщение
pawn Код:
CMD:spray(playerid, params[])
{
        new Float:X, Float:Y, Float:Z, Float:Angle;
        GetPlayerPos(playerid, X, Y, Z);
        GetPlayerFacingAngle(playerid, Angle);
        CreateObject(1490, X, Y, Z+0.5, 0.0,0.0 , Angle-270, 100);
        return 1;
}
SOLVED LORDZ TAG MIS MATCH WITH ANGLE
Try replacing that line with this and check
pawn Код:
Angle = GetPlayerFacingAngle(playerid);
Reply
#7

nope the code iz 99% perfect i just have to edit the X or Y coord to put it a little front of the player :d i cant remember which after test twice i would know

Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)