Jump to content
GIGN Forum

Team Color Sprite (Fix Error)


Recommended Posts

Sveiki visiem. Taatad pameeginaaju serverii spraitam uzlikt komandas kraasas (T - red, CT - blue), rekur ir kods, kompileejas it kaa bez erroriem, bet speelee spraits ir bezkrasains un uzreiz nogalina cilveeku + konsolee raada kkadu FUN, FAKEMETS , out of range kljuudu un kko arii ar cs get user team... Kr4 paliidziet luudzu salabot :

new id=read_data(2) 
new CsTeams:team=cs_get_user_team(id)   
if(team==CS_TEAM_T) { Create_TE_BEAMENTS( iCaster, iTarget, g_iSprites[sPR_LIGHTNING], 0, 15, }
else if(team==CS_TEAM_CT) { Create_TE_BEAMENTS( iCaster, iTarget, g_iSprites[sPR_LIGHTNING], 0, 15, } }

Link to comment
Share on other sites

Taču paskaties, kā tas stock izskatās:


stock Create_TE_BEAMENTS(startEntity, endEntity, iSprite, startFrame, frameRate, life, width, noise, red, green, blue, alpha, speed){

message_begin( MSG_BROADCAST, SVC_TEMPENTITY )

write_byte( TE_BEAMENTS )

write_short( startEntity ) // start entity

write_short( endEntity ) // end entity

write_short( iSprite ) // model

write_byte( startFrame ) // starting frame

write_byte( frameRate ) // frame rate

write_byte( life ) // life

write_byte( width ) // line width

write_byte( noise ) // noise amplitude

write_byte( red ) // red

write_byte( green ) // green

write_byte( blue ) // blue

write_byte( alpha ) // brightness

write_byte( speed ) // scroll speed

message_end()

}

Attiecīgi arī izsauc to funkciju, norādot visus nepieciešamos parametrus, tajā skaitā krāsu - RRR GGG BBB formātā.

Edited by DeimoN
Link to comment
Share on other sites

es tak tev teicu, ka tev ir id, iCaster, iTarget <= 3 cilveki iesaistiti... bet vajag, lai butu 2..., es nezinu, no kurienes tu njemi id, bet visticamak tas vai nu ir iCaster vai iTarget... kods varetu izskatities ta:

new CsTeams:team=cs_get_user_team(iCaster)   

if(team==CS_TEAM_T)

{

Create_TE_BEAMENTS( iCaster, iTarget, g_iSprites[sPR_LIGHTNING], 0, 15, ...[WTF, kur parejie cipari?]...)

}

else if(team==CS_TEAM_CT)

{

Create_TE_BEAMENTS( iCaster, iTarget, g_iSprites[sPR_LIGHTNING], 0, 15, ...[WTF, kur parejie cipari?]...)

}

Link to comment
Share on other sites

Labi, ar Orc skaidrs, bet piemēram kā to pašu izdarīt race_elf.inl, es izdariju apm. to pašu , bet man sāka niķoties compile.exe, izmeta 30error :D

Sma kods - Create_TE_BEAMPOINTS( iStart, iEnd, g_iSprites[sPR_BEAM], 0, 0, ( floatround( ENTANGLE_TIME ) * 10 ), 10, 5, 10, 108, 23, 255, 0 );

Edited by prik-
Link to comment
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
 Share

×
×
  • Create New...