shaun Posted March 6, 2011 Posted March 6, 2011 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 effectLuam includeul de aici -> http://www.megaupload.com/?d=3DDTZXRUIl bagam in - Serverul tau->Pawno->IncludeAsa 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... > muhahaAll credits go to SlientHuntR!!Yo n-am facut decat tutorialul...multumesc :laugh: CHECK MY CHANNEL!http://www.youtube.com/user/amysoica
IstuntmanI Posted March 6, 2011 Posted March 6, 2011 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 :)
Akord Posted March 6, 2011 Posted March 6, 2011 mama pentru asa ceva a scris acolo o gramada de linii ... + inccel 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.
shaun Posted March 6, 2011 Author Posted March 6, 2011 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 CHECK MY CHANNEL!http://www.youtube.com/user/amysoica
Akord Posted March 6, 2011 Posted March 6, 2011 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 ...
Andr3 Posted March 7, 2011 Posted March 7, 2011 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
shaun Posted March 7, 2011 Author Posted March 7, 2011 dar nu imi mai comentati mie ci lui nu eu lam facut eu doar lam explicat CHECK MY CHANNEL!http://www.youtube.com/user/amysoica
AnDy13 Posted March 8, 2011 Posted March 8, 2011 bun tutorial <<uite eu comentez de bn la tn, dar u...?>> imi place e foarte folositor gg;)
Roach Posted March 8, 2011 Posted March 8, 2011 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 JobSa zicem ca e bun dar tot mai simplu e sa ti se faca ecranul tot Rosu si dupa sa dispara. Underground-GFX
BlueSkiLLz Posted March 8, 2011 Posted March 8, 2011 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
shaun Posted March 8, 2011 Author Posted March 8, 2011 repet...eu doar am facut tutorialul....si am aratat la altii,de unde il pot instala,ca poate si-au dorit... CHECK MY CHANNEL!http://www.youtube.com/user/amysoica
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now