snow?
#2

To be honest this is a bad idea and your FPS(Frames per second) will decrease. There's another way you could create a falling snow by using the sa-mp function called GetPlayerCameraPos + you don't need to use loop

GetPlayerCameraPos
Quote:
Originally Posted by SA-MP Wikipedia
Players' camera positions are only updated once a second, unless aiming.
It is recommended to set a 1 second timer if you wish to take action that relies on a player's camera position.
Example Code
pawn Код:
#include <a_samp>

public OnPlayerSpawn(playerid)
{
    return SnowSettings(playerid, true);
}

SnowSettings(playerid, bool:on = true)
{
    new
        FallingSnowObject
    ;
    if(on)
    {
        new Float:Position[3];
        GetPlayerCameraPos( playerid, Position[0], Position[1], Position[2] /*-----------------------------------------------*/);
        FallingSnowObject = CreatePlayerObject( playerid, 18864, Position[0], Position[1], Position[2]-5, 0.0, 0.0, 0.0, 300.0 );
        SendClientMessage(playerid, -1, "[DEBUG] - SnowSettings - Enabled");
    }
    else if(!on)
    {
        DestroyPlayerObject( playerid, FallingSnowObject);
        SendClientMessage(playerid, -1, "[DEBUG] - SnowSettings - disabled");
    }
    return true;  
}
Compilation compiled with -d3
Код:
Pawn compiler 3.2.3664	 	 	Copyright © 1997-2006, ITB CompuPhase

Header size:            256 bytes
Code size:              664 bytes
Data size:                0 bytes
Stack/heap size:      16384 bytes; estimated max. usage=29 cells (116 bytes)
Total requirements:   17304 bytes
[Finished in 0.1s]
PS: This was posted by me | Original Thread: http://forum.sa-mp.com/showpost.php?...93&postcount=5
Reply


Messages In This Thread
snow? - by PawnoQ - 23.12.2013, 16:55
Re: snow? - by Patrick - 23.12.2013, 17:00
Re: snow? - by PawnoQ - 23.12.2013, 17:10
Re: snow? - by Patrick - 23.12.2013, 17:17
Re: snow? - by PawnoQ - 23.12.2013, 17:26

Forum Jump:


Users browsing this thread: 2 Guest(s)