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