How do I attach a player object to a player?
#1

Im making a snow effects FS. I got this
---------------------------------------------------------------------------------------------
if(strcmp("/snow", cmdtext, true) == 0)
{
new Float, Float:y, Float:z;
GetPlayerPos(playerid, x, y, z);
SetWeather(27);
SnowObject[playerid] = CreatePlayerObject(playerid, 18863, x, y, z, 0.00, 0.00, 0.00, 0.00);
AttachObjectToPlayer(SnowObject[playerid], playerid, 35.00, 0.00, 0.00, 0.00, 0.00, 15.00);

return 1;
}
---------------------------------------------------------------------------------------------

Im sorry, i cant remember how to add codes. But anyway, im trying to make it where only that player can see the snow, and then have it move with them. It would be smoother then runnung a bunch of updates. I want it to cover there camera, that along with the right weather would look nice.
Reply
#2

Try this:

pawn Код:
if(strcmp("/snow", cmdtext, true) == 0)
{
    new Float:x, Float:y, Float:z;
    GetPlayerPos(playerid, x, y, z);
    SetWeather(27);
    SetPlayerAttachedObject(playerid, 0, 18864, 1, -2.931000, 0.000000, 0.000000, 0.000000, 90.599914, 0.000000, 1.000000, 1.000000, 1.000000);
    return 1;
}
Does it work? Untested.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)