Rakete (snow)

Započeo Draxy, Decembar 12, 2014, 23:44:04 POSLE PODNE

prethodna tema - sledeća tema

0 članova i 4 gostiju pregledaju ovu temu.

Skripta koju koristim:OG
Detaljan opis problema:ubcim snow na server odem snow namjestim sve u cgf meni rakete padaju
Dio skripte:Ja ubacim snow a meni padaju rakete
http://prntscr.com/5g5kzg
/*******************************************************************************

	Snow filterscript to simulate falling snow effects for SA:MP
	SA:MP 0.3


	Author: James "Jay" Wilkinson
	

	irc.gtanet.com #Jay
	irc.gtanet.com #ww3
	irc.sa-mp.com #ww3


	Copyright (c) Jay 2009

*******************************************************************************/
#include <a_samp>



#define SNOW_OBJECT      354

#define SLOTS       	200         // aka MAX_PLAYERS

#define MAX_SNOW        20


static snowObject[SLOTS][MAX_SNOW+1];
static snowActive[SLOTS];




public OnFilterScriptExit()
{
	for(new i = 0; i < SLOTS; i++)
	{
		if(!IsPlayerConnected(i) || IsPlayerNPC(i))
		    continue;
		    
	    DestroySnow(i);
	}
	return 1;
}

public OnPlayerDisconnect(playerid, reason)
{
	if(!IsPlayerNPC(playerid))
		DestroySnow(playerid);
}

public OnPlayerSpawn(playerid)
{
	CreateSnow(playerid);
}

public OnPlayerCommandText(playerid, cmdtext[])
{
	if(!strcmp(cmdtext, "/snow"))
	{
	    if(!snowActive[playerid])
	    {
	        CreateSnow(playerid);
	    }else{
	        DestroySnow(playerid);
	    }
	    return 1;
	}
	return 0;
}


stock CreateSnow(playerid)
{
	if(GetPlayerState(playerid) == 0 || GetPlayerState(playerid) > 6)
	    return;

	if(GetPlayerInterior(playerid) != 0)
	    return;

	if(snowActive[playerid] == 1)
	    return;

	snowActive[playerid] = 1;

	new
	    Float:x,
	    Float:y,
	    Float:z;

	GetPlayerPos(playerid, x, y, z);

	for(new i = 0; i < MAX_SNOW; i++)
	{
		snowObject[playerid][i] = CreatePlayerObject(playerid, SNOW_OBJECT, x, y , z , 0, 0, 0);
		RecreateSnow(playerid, snowObject[playerid][i]);
	}
}



stock DestroySnow(playerid)
{
	snowActive[playerid] = 0;

	for(new i = 0; i < MAX_SNOW; i++)
	{
	    DestroyPlayerObject(playerid, snowObject[playerid][i]);
	}
}

stock RecreateSnow(playerid, objectid)
{
	if(snowActive[playerid] == 0)
	    return;


	new
	    Float:x,
	    Float:y,
	    Float:z,
	    Float:objX,
	    Float:objY,
	    Float:objZ;
	    
	GetPlayerPos(playerid, x, y, z);

	// And before you ask, I use random twice because SA:MP's random sucks ass
    new i = random(random(100));

	if(i < 20)
	{
	    SetPlayerObjectPos(playerid, objectid, x - random(random(100)), y + random (random(70)), z + random(20)+20);
	}
	else if(i >= 21 && i <= 30)
	{
		SetPlayerObjectPos(playerid, objectid, x + random(random(100)), y + random (random(70)), z + random(20)+20);
	}
	else if (i >= 31 && i < 40)
	{
		SetPlayerObjectPos(playerid, objectid, x + random(random(70)), y - random (random(100)), z + random(20)+20);
	}
	else
	{
	    SetPlayerObjectPos(playerid, objectid, x + random(random(120)), y + random (random(30)), z + random(20)+20);
	}

	GetPlayerObjectPos(playerid, objectid, objX, objY, objZ);

	MovePlayerObject(playerid, objectid, objX, objY, z-10, random(70)+5);

}

public OnPlayerObjectMoved(playerid, objectid)
{

	if(snowActive[playerid] == 0)
	    return 1;

	for(new i = 0; i < MAX_SNOW; i++)
	{
	    if(objectid == snowObject[playerid][i])
	    {
	        RecreateSnow(playerid, objectid);
	        return 1;
	    }
	}
	return 1;
}


NEMAMI NIJEDNOG ERORA!!! POMOC
Poslednja Izmena: Decembar 12, 2014, 23:52:13 POSLE PODNE od New York1

Dali si ovo sam radio?
Ili si skinuo negdje sa neta [FS] ?

Pogledaj u modu u kojem procesu pises ZCMD YCMD pa samo prebaci ovaj /snow u drugi ZCMD YCMD koji vec je
Poslednja Izmena: Decembar 13, 2014, 00:08:18 PRE PODNE od purgerrr

Citat: purgerrr poslato Decembar 13, 2014, 00:04:46 PRE PODNE
Dali si ovo sam radio?
Ili si skinuo negdje sa neta [FS] ?

Pogledaj u modu u kojem procesu pises ZCMD YCMD pa samo prebaci ovaj /snow u drugi ZCMD YCMD koji vec je
Dao bi jedan lik ne kontam sta da uradim?


Citat: purgerrr poslato Decembar 13, 2014, 00:13:33 PRE PODNE
Pogledaj si u modu izgleda ti ovako http://prntscr.com/5g5yg5
na kraju skripte ili negdje mora ti biti tako nesto Komanda
http://prntscr.com/5g60ao ima samo to ee de mozes mi ti uraditi jel ja neznam oko skripte

To sta ti imas je filterscript FilterSkripta
Ako nisi ubacio odes ovako taj file koji imas
Ubacis taj file u server folder koji se zove "filterscripts"
kada si to napravio odes u server.cfg i tamo pod filterscripts dodas razmak i upises ime te filter scripte koju si dodao u folder "filterscripts"

to je sva mudrolija ako nisi napravio to

To je neka jako stara skripta koja je pravljena dok još uvek nije postojao objekat snega, koristi objekat 354 (Hydra Flare), kreira se 20 objekata oko svakog igrača i kreću se random... Potraži neku bolju skriptu, ima ih na tone, inače objekat snega je 18864




Progress doesn't come from early risers — progress is made by lazy men looking for easier ways to do things. - Robert A. Heinlein

Pa mezetel mi vi dati FS snijeg :) jbg nisam znao da je stsra skripta

Evo ti prva na koju sam naleteo...imaš ih more, koristi search
http://balkan-samp.com/forum/index.php?topic=96571




Progress doesn't come from early risers — progress is made by lazy men looking for easier ways to do things. - Robert A. Heinlein



Molimo te da procitas pravila foruma te da onda otvoris temu po pravilima.

Razlog zakljucavanja:

fali ti prefiks -__-

Pravila:

Glavna pravila Balkan SA:MP foruma .
Razgovor u vezi PAWN-Skriptanja .