Need Help Attach Object
#1

Hi , i want to create an other vip cmds ,so i want /box then it set in the front of the Player a Box spo he can jump on it , i mean what is the Id of a good Box ? thanks .
Reply
#2

Do you want a box that can be broken or stays strong?
Reply
#3

Stay Strong
Reply
#4

id 1685
a block that fits to your ask
^^
Reply
#5

so the function is :

AttachObjectToPlayer(playerid, ....;?
Reply
#6

maybe how i said i dont know anything about scripting but all about mapping stuff
Reply
#7

The player probably wont be able to jump on it if you attach it
Reply
#8

hmm.. i see so i don't need to attach it but
GetPlayer Position X, Y , Z+3 or something to spawn the object in the front of him
Reply
#9

Use this function:

pawn Код:
stock GetXYInFrontOfPlayer(playerid, &Float:x, &Float:y, Float:distance)
{
    new Float:a;
    GetPlayerPos(playerid, x, y, a);
    GetPlayerFacingAngle(playerid, a);
    if(GetPlayerVehicleID(playerid)) GetVehicleZAngle(GetPlayerVehicleID(playerid), a);
    x += (distance * floatsin(-a, degrees));
    y += (distance * floatcos(-a, degrees));
}
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)