hlmod.hu
https://hlmod.hu/

Földre Drop
https://hlmod.hu/viewtopic.php?f=9&t=25755
Oldal: 1 / 1

Szerző:  Troy [2016.08.03. 12:28 ]
Hozzászólás témája:  Földre Drop

Hali egy olyat szeretnék kérni hogy pl ha valaki megolok akkor ládát dob a helyére és fel lehet venni és abbol kapok pl 25 aranyat köszönöm elöre is

Szerző:  foslap [2016.08.03. 13:11 ]
Hozzászólás témája:  Re: Földre Drop

WSS
innen kiszeded a szkineket, a droppot meg átállítod és kész is! :)

Szerző:  Troy [2016.08.03. 14:13 ]
Hozzászólás témája:  Re: Földre Drop

foslap írta:
WSS
innen kiszeded a szkineket, a droppot meg átállítod és kész is! :)


Megtudod nézni hogy ez miért nem veszi fel a dropot?
  1. public plugin_init() {
  2.     register_forward(FM_Touch,"ForwardTouch" );  
  3. }
  4. new const Csomag[][] = {
  5.     "models/pb/Drop/arany.mdl"
  6. }
  7. public plugin_precache() {
  8.      new cim[121]
  9.     for(new i;i < 1; i++) {
  10.         format(cim, charsmax(cim),"%s", Csomag[i])
  11.         precache_model(cim)
  12.         }
  13. }
  14. public death()
  15. {
  16. new killer = read_data(1)
  17. new victim = read_data(2)
  18.  
  19. if(killer != victim)
  20. {
  21. new mennyiseg = random_num(2, 10)
  22. tp[killer] += mennyiseg
  23. DropEllenorzes(killer) 
  24. while(tp[killer] >=  szamok[szint[killer]])
  25. {
  26. szint[killer]++
  27. tp[killer]-= 100
  28. }
  29. }
  30. }
  31. public DropEllenorzes(id) {
  32.         AranyDobas()
  33.     }
  34.  
  35.  
  36. public logevent_round_start()
  37. {
  38.     new hkt = FM_NULLENT;
  39.     while ( ( hkt = fm_find_ent_by_class( hkt,  "Arany") ) )
  40.     {
  41.         engfunc( EngFunc_RemoveEntity, hkt );
  42.     }  
  43. }
  44. public AranyDobas()
  45. {  
  46.     new victim = read_data( 2 );
  47.    
  48.     static Float:origin[ 3 ];
  49.     pev( victim, pev_origin, origin );
  50.    
  51.     new ent = engfunc( EngFunc_CreateNamedEntity, engfunc( EngFunc_AllocString, "info_target" ) );
  52.     origin[ 2 ] -= 36;
  53.     engfunc( EngFunc_SetOrigin, ent, origin );
  54.    
  55.     if( !pev_valid( ent ) )
  56.     {
  57.         return PLUGIN_HANDLED;
  58.     }
  59.    
  60.     set_pev( ent, pev_classname, "Arany" );
  61.     engfunc( EngFunc_SetModel, ent, Csomag[0] );
  62.     dllfunc( DLLFunc_Spawn, ent );
  63.     set_pev( ent, pev_solid, SOLID_BBOX );
  64.     set_pev( ent, pev_movetype, MOVETYPE_NONE );
  65.     engfunc( EngFunc_SetSize, ent, Float:{ -23.160000, -13.660000, -0.050000 }, Float:{ 11.470000, 12.780000, 6.720000 } );
  66.     engfunc( EngFunc_DropToFloor, ent );
  67.    
  68.     return PLUGIN_HANDLED;
  69. }
  70. public AranyTouch(ent, id)
  71. {
  72.     if(pev_valid(ent))
  73.     {
  74.         new classname[ 32 ];
  75.         pev( ent, pev_classname, classname, charsmax( classname ) );
  76.        
  77.         if( !equal( classname, "Arany") )
  78.         {
  79.             return FMRES_IGNORED;
  80.         }
  81.        
  82.         new pPont;
  83.        
  84.         pPont += random_num(1, 11)
  85.          
  86.     pont[id] += pPont
  87.     set_dhudmessage(255, 212, 0, -1.0, 0.15, 0, 6.0, 2.0)
  88. show_dhudmessage(id, "+%d Arany", pPont)
  89.        
  90.         engfunc( EngFunc_RemoveEntity, ent );
  91.     }
  92.     return FMRES_IGNORED
  93. }

Oldal: 1 / 1 Minden időpont UTC+02:00 időzóna szerinti
Powered by phpBB® Forum Software © phpBB Limited
https://www.phpbb.com/