Garry's Mod

Garry's Mod

[E2] WeaponCore
 이 토론은 고정되었습니다. 중요해서 그렇겠죠?
Sir Papate  [개발자] 2015년 5월 30일 오후 12시 51분
Documentation
Functions

Function Return Description runOnWeaponSwitch(N) If N == 0, the chip will no longer run on weapon switch events, otherwise it makes this chip execute when someone weapon switch. Only needs to be called once, not in every execution. weaponSwitchClk() N Returns 1 if the chip is being executed because of a weapon switch event. Returns 0 otherwise. lastWeaponSwitchPlayer() E Return the player switching weapons. lastWeaponSwitchOld() E Return the previous weapon. lastWeaponSwitchNext() E Return the weapon the player switched to.

Function Return Description runOnWeaponEquip(N) If N == 0, the chip will no longer run on equip weapon events, otherwise it makes this chip execute when someone equip weapon. Only needs to be called once, not in every execution. weaponEquipClk() N Returns 1 if the chip is being executed because of a equip weapon event. Returns 0 otherwise. lastWeaponEquip() E Return the equipped weapon.

Function Description E:plyGive(S) Give the player a weapon. E:plyGiveAmmo(S,N) Gives ammo to a player. E:plySetAmmo(S,N) Sets the amount of of the specified ammo for the player. E:plySetActiveWeapon(S) Sets the player active weapon. E:plySetActiveWeapon(E) E:plyDropWeapon(S) Drops the players' weapon of a specific class. E:plyDropWeapon(E) Forces the player to drop the specified weapon. E:plyStripWeapon(S) Removes the specified weapon class from a certain player. E:plyStripWeapon(E) Removes the specified weapon from a certain player E:plyStripWeapons() Removes all weapons from a certain player E:plyStripAmmo(N) Removes all ammo from the player. E:plySetClip1(N) Lets you change the number of bullets in the given weapons primary clip. E:plySetClip2(N) Lets you change the number of bullets in the given weapons secondary clip.

Function Return Description E:getWeapon(S) E Returns the weapon entity whit the class. E:getWeapons() R Returns a table of the player's weapons. E:hasWeapon() N Returns if the player has the specified weapon.

For the PlayerCore WorkShop, click here.
For the DamageCore WorkShop, click here.
Sir Papate 님이 마지막으로 수정; 2016년 7월 29일 오후 12시 37분
< >
전체 댓글 5개 중 1~5개 표시 중
Sanders 2017년 9월 25일 오전 12시 08분 
ok im doing this
if(REMOVE_AMMO)
{
Player:plySetClip1(0)

Player:plySetClip2(0)

Player:plyStripAmmo()
}


now setclip and set clip2 work but

strip ammo doesnt any idea?
Aestareth 2018년 3월 28일 오전 7시 12분 
tf is REMOVE_AMMO
Sanders 2018년 4월 2일 오후 8시 18분 
Acϲelerąțǿr 님이 먼저 게시:
tf is REMOVE_AMMO


REMOVE_AMMO is the input so if its tuned on then weapon ammo is stripped
Funoji 2020년 4월 26일 오후 5시 09분 
roland 2025년 2월 16일 오전 11시 38분 
I've reloaded the mod, but plySetActiveWeapon is still not working
< >
전체 댓글 5개 중 1~5개 표시 중
페이지당 표시 개수: 1530 50