Poate v-ati intrebat cateodata,jucandu-va pe alte servere..cum sa faceti sa se vada ecranul rosu cand playerul pierde viatza...cam ca aici ->
http://www.xfire.com/video/2003aa/
Simplu....
Un scripter,SilentHuntR,a inventat un include,care face posibil aceast Damage effect
Luam includeul de aici -> http://www.megaupload.com/?d=3DDTZXRU
Il bagam in - Serverul tau->Pawno->Include
Asa totu' este bineeee....
Acuma ce mai facem?
Bagam la includeuri
Code: Select all
#include <j_fader_v2>
Code: Select all
new Float:gTmp;
new Float:pOldHealth[MAX_PLAYERS];
new Float:vSpeed[MAX_PLAYERS];
new Float:gtemp[4]; //global temporary variables
new JustDied[MAX_PLAYERS];
Code: Select all
FadeInit();
La ongamemodeexit:
Code: Select all
FadeExit();
la onplayerconnect:
Code: Select all
FadePlayerConnect(playerid);
JustDied[playerid]=0;
la onplayerdisconnect:
Code: Select all
FadePlayerDisconnect(playerid);
Code: Select all
FadeColorForPlayer(playerid,255,0,0,0,255,0,0,255,25,1000);
JustDied[playerid]=1;
la onplayerspawn:
Code: Select all
if(JustDied[playerid])
{
FadeColorForPlayer(playerid,255,0,0,255,255,0,0,0,25,0);
JustDied[playerid]=0;
}
Code: Select all
if(newstate==PLAYER_STATE_ONFOOT)vSpeed[playerid]=0;
la onplayerupdate:
Code: Select all
GetPlayerHealth(playerid,gTmp);
if(pOldHealth[playerid]>gTmp)
{
FadeColorForPlayer(playerid,255,0,0,floatround(pOldHealth[playerid]-gTmp)*10,255,0,0,0,floatround(pOldHealth[playerid]-gTmp),0);
}
pOldHealth[playerid]=gTmp;
if(IsPlayerInAnyVehicle(playerid))
{
GetVehicleVelocity(GetPlayerVehicleID(playerid),gtemp[0],gtemp[1],gtemp[2]);
gtemp[3]=floatsqroot( floatmul(gtemp[0],gtemp[0])+floatmul(gtemp[1],gtemp[1])+floatmul(gtemp[2],gtemp[2]) )*100;
if(vSpeed[playerid]-gtemp[3]>20)FadeColorForPlayer(playerid,255,0,0,(floatround(vSpeed[playerid]-gtemp[3])-20)*3,255,0,0,0,floatround(vSpeed[playerid]-gtemp[3])-20,0);
vSpeed[playerid]=gtemp[3];
[font=courier]Atentie![/font] Daca nu va descurcati...nu gasiti un callback...ca onplayerupdate....etc...am facut aici un exemplu la cum o sa arate:
Code: Select all
/*
include by SilentHuntR..
Tutorial by CookieEatingMonster
All credits go to SilentHuntR!!!!!!
SilentHuntR
SilentHuntR
SilentHuntR
SilentHuntR
SilentHuntR
SilentHuntR
SilentHuntR
SilentHuntR
SilentHuntR
SilentHuntR
SilentHuntR
SilentHuntR
SilentHuntR
SilentHuntR
SilentHuntR
SilentHuntR
SilentHuntR
SilentHuntR
SilentHuntR
SilentHuntR
SilentHuntR
SilentHuntR
SilentHuntR
SilentHuntR
SilentHuntR
SilentHuntR
SilentHuntR
SilentHuntR
SilentHuntR
SilentHuntR
SilentHuntR
SilentHuntR
SilentHuntR
SilentHuntR
SilentHuntR
SilentHuntR
SilentHuntR
SilentHuntR
SilentHuntR
*/
#include <a_samp>
#include <j_fader_v2>
new Float:gTmp;
new Float:pOldHealth[MAX_PLAYERS];
new Float:vSpeed[MAX_PLAYERS];
new Float:gtemp[4]; //global temporary variables
new JustDied[MAX_PLAYERS];
public OnFilterScriptInit()
{
FadeInit();
return 1;
}
public OnFilterScriptExit()
{
FadeExit();
return 1;
}
public OnPlayerConnect(playerid)
{
FadePlayerConnect(playerid);
JustDied[playerid]=0;
return 1;
}
public OnPlayerDisconnect(playerid,reason)
{
FadePlayerDisconnect(playerid);
return 1;
}
public OnPlayerDeath(playerid,killerid,reason)
{
FadeColorForPlayer(playerid,255,0,0,0,255,0,0,255,25,1000);
JustDied[playerid]=1;
return 1;
}
public OnPlayerSpawn(playerid)
{
if(JustDied[playerid])
{
FadeColorForPlayer(playerid,255,0,0,255,255,0,0,0,25,0);
JustDied[playerid]=0;
}
return 1;
}
public OnPlayerStateChange(playerid,newstate,oldstate)
{
if(newstate==PLAYER_STATE_ONFOOT)vSpeed[playerid]=0;
return 1;
}
public OnPlayerUpdate(playerid)
{
GetPlayerHealth(playerid,gTmp);
if(pOldHealth[playerid]>gTmp)
{
FadeColorForPlayer(playerid,255,0,0,floatround(pOldHealth[playerid]-gTmp)*10,255,0,0,0,floatround(pOldHealth[playerid]-gTmp),0);
}
pOldHealth[playerid]=gTmp;
if(IsPlayerInAnyVehicle(playerid))
{
GetVehicleVelocity(GetPlayerVehicleID(playerid),gtemp[0],gtemp[1],gtemp[2]);
gtemp[3]=floatsqroot( floatmul(gtemp[0],gtemp[0])+floatmul(gtemp[1],gtemp[1])+floatmul(gtemp[2],gtemp[2]) )*100;
if(vSpeed[playerid]-gtemp[3]>20)FadeColorForPlayer(playerid,255,0,0,(floatround(vSpeed[playerid]-gtemp[3])-20)*3,255,0,0,0,floatround(vSpeed[playerid]-gtemp[3])-20,0);
vSpeed[playerid]=gtemp[3];
}
return 1;
}
Gata de download : http://solidfiles.com/d/7048/
Cam asta a fost :shocked: poate imi mai vin idei d'astea si mai fac tutoriale :)) din pacate pentru voi... >:) muhaha
All credits go to SlientHuntR!!
Yo n-am facut decat tutorialul...multumesc :laugh: