Raised This Month: $51 Target: $400
 12% 

[SOLVED] RemovePlayerItem taser


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Sples1
Senior Member
Join Date: Apr 2016
Location: Kitsune Lab
Old 08-09-2017 , 19:13   [SOLVED] RemovePlayerItem taser
Reply With Quote #1

Hey guys!

I want to remove a taser from all alive players whi have, but I always get report. Im begginner but I want it for SM_Hosties. Because when someone use a taser in shot4shot the server crash. So I want remove all taser when lr is activated :/ Can you guys help me about that?

Thank for the reply
Sples1 is offline
BraveFox
AlliedModders Donor
Join Date: May 2015
Location: Israel
Old 08-09-2017 , 19:56   Re: RemovePlayerItem taser
Reply With Quote #2

I had the same problem so I removed the taser at all,
do you want me to give you the code to remove it at all? or you want me to give you a code to remove when lr is active?
__________________
Contact Me:
Steam: NoyB
Discord: Noy#9999
Taking Private Requests
BraveFox is offline
Sples1
Senior Member
Join Date: Apr 2016
Location: Kitsune Lab
Old 08-09-2017 , 20:06   Re: RemovePlayerItem taser
Reply With Quote #3

I wanna ask you, to give the code when lr is active Please ;)

Last edited by Sples1; 08-09-2017 at 20:20.
Sples1 is offline
ambn
Veteran Member
Join Date: Feb 2015
Location: Fun servers
Old 08-10-2017 , 01:50   Re: RemovePlayerItem taser
Reply With Quote #4

You need to use this https://github.com/dataviruset/sm-ho...ipting/include from SM_HOSTIES then use it's forward to check when LR starts , then just use a for loop for all ingame users then if they were valid just RemovePlayerItem(client, "weapon_taser").

PHP Code:
public int OnStartLR(PrisonerIndexGuardIndexLR_iType)
{
      
//Your Loop Here

__________________

Last edited by ambn; 08-10-2017 at 01:52.
ambn is offline
Sples1
Senior Member
Join Date: Apr 2016
Location: Kitsune Lab
Old 08-10-2017 , 03:56   Re: RemovePlayerItem taser
Reply With Quote #5

I try to use RemovePlayerItem(client, "weapon_taser"); but I get "argument type mismatch (argument 2)" error :/
EDIT: It's solved, but I have one question left. How can I check if player chooses rebel with this "restriction"?

Last edited by Sples1; 08-10-2017 at 04:32.
Sples1 is offline
stephen473
Senior Member
Join Date: Jan 2017
Location: somewhere on earth
Old 08-10-2017 , 05:43   Re: RemovePlayerItem taser
Reply With Quote #6

https://github.com/dataviruset/sm-ho...astrequest.inc

PHP Code:
    if (IsClientInRebel(client))
    {
        
// do something..
    

__________________
Also known as Hardy`.

Feel free to contact me if you have a private plugin request!

My Steam Profile | Discord: Hardy`#3792
stephen473 is offline
Sples1
Senior Member
Join Date: Apr 2016
Location: Kitsune Lab
Old 08-10-2017 , 05:45   Re: RemovePlayerItem taser
Reply With Quote #7

Thanks for the reply, I just saw.
But I mean, how can I check if player in GunToss or etc?
I mean, check if example someone choose noscope and etc
Sples1 is offline
ambn
Veteran Member
Join Date: Feb 2015
Location: Fun servers
Old 08-10-2017 , 06:59   Re: [SOLVED] RemovePlayerItem taser
Reply With Quote #8

PHP Code:
    LR_KnifeFight "Knife Fight"
    
LR_Shot4Shot "Shot4Shot"
    
LR_GunToss "Gun Toss"
    
LR_ChickenFight "Chicken Fight"
    
LR_HotPotato "Hot Potato"
    
LR_Dodgeball "Dodgeball"
    
LR_NoScope "No Scope Battle"
    
LR_RockPaperScissors "Rock Paper Scissors"
    
LR_Rebel "Rebel!"
    
LR_Mag4Mag "Mag4Mag"
    
LR_Race "Race"
    
LR_RussianRoulette "Russian Roulette" 
According to this and the last post i gave you, you can compare LR_iType to one of these to check the LR Type.
__________________

Last edited by ambn; 08-10-2017 at 07:01.
ambn is offline
Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 03:40.


Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Theme made by Freecode