Jump to content

Recommended Posts

Posted

Salut all....

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

#include <j_fader_v2>
sub includeuri bagam :
new Float:gTmp;
new Float:pOldHealth[MAX_PLAYERS];
new Float:vSpeed[MAX_PLAYERS];
new Float:gtemp[4]; //global temporary variables
new JustDied[MAX_PLAYERS];
la ongamemodeinit :
FadeInit();
La ongamemodeexit:
 FadeExit();
la onplayerconnect:
  FadePlayerConnect(playerid);
  JustDied[playerid]=0;
la onplayerdisconnect:
FadePlayerDisconnect(playerid);
La onplayerdeath:
FadeColorForPlayer(playerid,255,0,0,0,255,0,0,255,25,1000);
  JustDied[playerid]=1;
la onplayerspawn:
if(JustDied[playerid])
    {
    FadeColorForPlayer(playerid,255,0,0,255,255,0,0,0,25,0);
    JustDied[playerid]=0;
    }
la onplayerstatechange:
if(newstate==PLAYER_STATE_ONFOOT)vSpeed[playerid]=0;
la onplayerupdate:
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];
Atentie!  Daca nu va descurcati...nu gasiti un callback...ca onplayerupdate....etc...am facut aici un exemplu  la cum o sa arate:
/*

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:

u78ch.jpg

CHECK MY CHANNEL!

http://www.youtube.com/user/amysoica

Posted

Cea mai proasta varianta de facut asta, se poate si doar cu 2 variabile ... eu asa am de mult pe server (cu 2 variabile) si doar la OnPlayerUpdate :)

Posted

mama pentru asa ceva a scris acolo o gramada de linii ... + inc

cel mai simplu faceti cu textdraweditor faceai un textdrqawusebox rosu tot  si il folositi ... il faceti sa apara la jucator cand ii scade viata si sa dispara folosind un timer cred ca scot toate astea in 15 linii nu cate ai tu acolo.

Posted

dar nu eu lam facut...si in + la asta nu e rosu pe tot ecranul,cu cat dmg e mai mare cu atat ecranu e mai rosu :| nici nu lai incercat

u78ch.jpg

CHECK MY CHANNEL!

http://www.youtube.com/user/amysoica

Posted

da ma nu este nevoie sa il incerc asta pot face si eu sa fie rosu cu cat dmg e mai mare faci 3-4 textdrawuri cum am spus eu si gata ...

Posted

stuntman-=!!" post="59172" timestamp="1299444645"]

Cea mai proasta varianta de facut asta, se poate si doar cu 2 variabile ... eu asa am de mult pe server (cu 2 variabile) si doar la OnPlayerUpdate :)

Posted

dar nu imi mai comentati mie ci lui nu eu lam facut eu doar lam explicat

u78ch.jpg

CHECK MY CHANNEL!

http://www.youtube.com/user/amysoica

Posted

bun tutorial <<uite eu comentez de bn la tn, dar u...?>> imi place e foarte folositor gg;)

Ce GG ma omule poate GJ.

GG = Good Game | | GJ = Good Job

Sa zicem ca e bun dar tot mai simplu e sa ti se faca ecranul tot Rosu si dupa sa dispara.

142sj0l.png

Underground-GFX

Posted

chiar ma intrebam cum se poate dar ma intreb ca am mai vazut pe alte server respect system cred cand omori pe cineva iti da respect +2 +3 dupa cum il faci....nu stie nimeni de asa ceva....eu asta am vazut pe un server de 0.3b

Posted

repet...eu doar am facut tutorialul....si am aratat la altii,de unde il pot instala,ca poate si-au dorit...

u78ch.jpg

CHECK MY CHANNEL!

http://www.youtube.com/user/amysoica

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue. For more details you can also review our Terms of Use and Privacy Policy.