[Tutorial] Falling Snow!
#8

Quote:
Originally Posted by pds2k12
View Post
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


Example Code
pawn Code:
#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
Code:
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]
this one is fine, the topic's one could cause lag, bad idea.
nice job anyways..
Reply


Messages In This Thread
Falling Snow! - by TwisTa98 - 14.12.2013, 19:15
Re: Falling Snow! - by HeLiOn_PrImE - 14.12.2013, 20:13
Re: Falling Snow! - by fredelfredel - 14.12.2013, 20:52
Re: Falling Snow! - by BizzyD - 14.12.2013, 20:55
Re: Falling Snow! - by Patrick - 14.12.2013, 21:18
Re: Falling Snow! - by Stgnature - 14.12.2013, 21:34
Re: Falling Snow! - by Patrick - 14.12.2013, 21:46
Re: Falling Snow! - by xF4Life - 14.12.2013, 22:36
Re: Falling Snow! - by HeLiOn_PrImE - 15.12.2013, 20:11
Re: Falling Snow! - by MBilal - 19.12.2013, 16:06

Forum Jump:


Users browsing this thread: 1 Guest(s)