Jump to content

IStarkI

Members
  • Posts

    4
  • Joined

  • Last visited

IStarkI's Achievements

Vic

Vic (3/54)

0

Reputation

  1. @JeViCo The way with the slot didnt work. Here's what's going on - video. Honestly im out of ideas.
  2. @Dimos7 @JeViCo Im trying to replace several models to m4 (ID: 31 Model: 356) so ak47 is only a name (Like I said DayZ GM so I have many weapons). The problem is that when I switch the weapon to AK47 I receive a massive spam on chat (Many messages per second), the outputChatBox is only my way to test if it works. The way with the slot can work, so I'll try it when I get home and then let you know what happened. Edit: And the weapon isnt replacing. Only when i change to another weapon (for example ACR) I see the ak replace (and thats obvious because theres only AK instruction).
  3. @Dimos7 Model ID is 356. @JeViCo The model is replacing correctly but it keep spamming on chat "Wczytano AK47" like the script is repeating over and over. When I leave the script like function podmiankibronki () local bronka = getPlayerWeapon ( localPlayer ) if(getElementData(localPlayer,"currentweapon_1") == "AK47" and bronka == 31) then --engineImportTXD ( txd, 356 ) --engineReplaceModel ( dff, 356 ) outputChatBox ( "wczytano ak47" ) end end addEventHandler( "onClientPlayerWeaponSwitch", localPlayer, podmiankibronki ) everything works fine. I really have no idea whats wrong with this and its possible that there is another script that is bugging it?
  4. I have a problem with this code and I need some help. So when I am changing the weapon to AK47 the only thing I receive is spam on chat and I have no idea how to fix it. It's only happening when I add engineImportTXD and engineReplaceModel. Without It everything works perfectly. Can someone help me or give me some better ideas? GM - DayZ function wczytaj() txd = engineLoadTXD ( "models/ak47.txd" ) dff = engineLoadDFF ( "models/ak47.dff" ) outputChatBox ( "wczytano podmianki" ) end addEventHandler( "onClientResourceStart", getRootElement(), wczytaj ) function podmiankibronki () local bronka = getPlayerWeapon ( localPlayer ) if(getElementData(localPlayer,"currentweapon_1") == "AK47" and bronka == 31) then engineImportTXD ( txd, 356 ) engineReplaceModel ( dff, 356 ) outputChatBox ( "wczytano ak47" ) end end addEventHandler( "onClientPlayerWeaponSwitch", localPlayer, podmiankibronki )
×
×
  • Create New...