#1

Hello, can anyone give me a code for a realistic snow falling in samp?
Reply
#2

https://sampforum.blast.hk/showthread.php?tid=296904
Reply
#3

Hmm can you help me so that it always has snow? (No commands to turn it on/off) I will give you 4+ rep
Reply
#4

I am not sure for this
pawn Код:
// Credits to Kwarde for the FS
#include <a_samp>
#include <streamer>
#include <zcmd>

#undef MAX_PLAYERS
#define MAX_SLOTS           30

#define MAX_SNOW_OBJECTS    20
#define UPDATE_INTERVAL     750

#if MAX_SLOTS == -1
    #error Change MAX_SLOTS to the max players of your server! (At line 6)
#endif

#define ploop(%0)           for(new %0 = 0; %0 < MAX_SLOTS; %0++) if(IsPlayerConnected(%0))
#define CB:%0(%1)           forward %0(%1); public %0(%1)

new snowObject[MAX_SLOTS][MAX_SNOW_OBJECTS],
    updateTimer[MAX_SLOTS char]
;

public OnFilterScriptExit()
{
    ploop(i)
    {
        for(new j = 0; j < MAX_SNOW_OBJECTS; j++) DestroyDynamicObject(snowObject[i][j]);
        KillTimer(updateTimer{i});
    }
    return 1;
}

public OnPlayerDisconnect(playerid)
{

    for(new i = 0; i < MAX_SNOW_OBJECTS; i++) DestroyDynamicObject(snowObject[playerid][i]);
    KillTimer(updateTimer{playerid});
    return 1;
}

CB:UpdateSnow(playerid)
{
    new Float:pPos[3];
    GetPlayerPos(playerid, pPos[0], pPos[1], pPos[2]);
    for(new i = 0; i < MAX_SNOW_OBJECTS; i++) SetDynamicObjectPos(snowObject[playerid][i], pPos[0] + random(25), pPos[1] + random(25), pPos[2] - 5);
    return 1;
}
Reply
#5

hmm thx i will try
Reply
#6

Your Welcome!
I hope it works.
Reply
#7

Quote:
Originally Posted by Dripac
Посмотреть сообщение
Hmm can you help me so that it always has snow? (No commands to turn it on/off) I will give you 4+ rep
Just keep the snow on for all times,or remove the /on and /off commands.
If you still didnt understand send me a PM


[This forum requires that you wait 120 seconds between posts. Please try again in 34 seconds.]
Gosh -.-
Reply
#8

Quote:
Originally Posted by nuriel8833
Посмотреть сообщение
Just keep the snow on for all times,or remove the /on and /off commands.
If you still didnt understand send me a PM


[This forum requires that you wait 120 seconds between posts. Please try again in 34 seconds.]
Gosh -.-
I understand now, thx
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)