Raised This Month: $32 Target: $400
 8% 

[ZPS] Carrier / Infected Chat


Post New Thread Reply   
 
Thread Tools Display Modes
Author
will2tango
Member
Join Date: Nov 2009
Location: England
Plugin ID:
1745
Plugin Version:
1.0
Plugin Category:
Fun Stuff
Plugin Game:
Zombie Panic!
Plugin Dependencies:
    Servers with this Plugin:
     
    Plugin Description:
    Allows the Carrier to cominicate with Infected Survivors
    Old 06-18-2010 , 13:12   [ZPS] Carrier / Infected Chat
    Reply With Quote #1

    This plugin was created as proof of concept for ZombieSpy's suggestion Carrier/Infeced Comunication suggestion: http://www.zombiepanic.org/forums/sh...ad.php?t=12787
    It allows the Carrier to send chat messages to any infected survivors and allows them to comunicate back.

    CVARs:
    sm_infectedchat_version - current version
    sm_infected_chat - [0/1] sets infected chat on/off.
    sm_infchat "Message" - If you are the Carrier, sends your message to the Infected and vice versa. OR (in chat) !infchat Message.

    Change Log:
    1.00 Proof of Concept
    1.10 Added handeling for Client 0
    1.11 Replaced PrintToChat with ReplyToCommand

    Comments:
    This plugin was only created out of curiosity, but it did turn out to be quite amusing.
    Attached Files
    File Type: sp Get Plugin or Get Source (infectedchat.sp - 1157 views - 3.5 KB)

    Last edited by will2tango; 09-01-2010 at 03:52. Reason: Updated to 1.11
    will2tango is offline
    Master53
    Veteran Member
    Join Date: Dec 2009
    Old 06-20-2010 , 19:07   Re: [ZPS] Carrier / Infected Chat
    Reply With Quote #2

    EM pritty nice. one Qestion. to track the carrier is it just team 3 infected zombie? or what. because iv always wanted to know how to set someone to a carrier or to track the carrier. please msg back
    __________________
    Master(d)



    Master53 is offline
    Master53
    Veteran Member
    Join Date: Dec 2009
    Old 06-20-2010 , 19:08   Re: [ZPS] Carrier / Infected Chat
    Reply With Quote #3

    also http://forums.alliedmods.net/showthread.php?t=129504 for my new zps plugin which im currently creating. ima create a hole new gameplay with this in. i got a good thing in mind
    __________________
    Master(d)



    Master53 is offline
    will2tango
    Member
    Join Date: Nov 2009
    Location: England
    Old 06-21-2010 , 06:10   Re: [ZPS] Carrier / Infected Chat
    Reply With Quote #4

    Hey Master, that is an impressive plugin! ill have to give that one a try!
    Yea that was a tricky one, I must admit! there are two ways, the simple way I have used in this plugin.
    To check if a player is the carrier I first check for team three, then I check the players weapon.
    Code:
    decl String:attWeapon[32];
    GetClientWeapon(client, attWeapon, sizeof(attWeapon));
    if (StrEqual("weapon_carrierarms",attWeapon))
    If their current weapon is "weapon_carrierarms" we know they are a carrier

    Now the second is a little more difficult, but not only can it check if someone is a carrier it can also make them a Carrier!
    Have a look at Sammys thred here: http://www.zombiepanic.org/forums/sh...hlight=carrier
    But dont make the same mistake as me, its not an SDKcall offset, its an entprop offset

    I'm no where near as good as you or Sammy, but give me a shout if I can be of any help. Your best bet is Sammy-ROCK, Im fairly sure he can do anything in a ZPS plugin! He has helped me on my way many times already! but i might be able to help out a little Good Luck
    will2tango is offline
    Master53
    Veteran Member
    Join Date: Dec 2009
    Old 06-21-2010 , 10:21   Re: [ZPS] Carrier / Infected Chat
    Reply With Quote #5

    yea thanks but i dont really need sammys help. also thanks for the hint about the entprop offset
    __________________
    Master(d)



    Master53 is offline
    Master53
    Veteran Member
    Join Date: Dec 2009
    Old 06-21-2010 , 10:32   Re: [ZPS] Carrier / Infected Chat
    Reply With Quote #6

    so i used sammys iscarrier config.

    should it look something like this?

    PHP Code:
    new IsCarrier = -1;
    public 
    OnPluginStart()
    {
        new 
    Handle:conf LoadGameConfigFile("zpsinfectiontoolkit");
        
    IsCarrier GameConfGetOffset(conf"IsCarrier");
        
    CloseHandle(conf);

    Example
    PHP Code:
    SetEntData(entityoffsetany:valuesize=4bool:changeState=false); 
    Or
    PHP Code:
    SetEntProp(ClientProp_Data"m_iFrags"0); 
    To this
    PHP Code:
    SetEntProp(ClientProp_Data"IsCarrier"104true); 
    Or
    PHP Code:
    SetEntProp(ClientProp_Data"IsCarrier"1); 
    __________________
    Master(d)




    Last edited by Master53; 06-21-2010 at 11:24.
    Master53 is offline
    will2tango
    Member
    Join Date: Nov 2009
    Location: England
    Old 06-23-2010 , 07:07   Re: [ZPS] Carrier / Infected Chat
    Reply With Quote #7

    Its been a long time since I used that one.
    Almost, try your last one but without the "Prop_Data" paramater, and IsCarrier without the quotes that looks right to me, i dont think you need the last two paramiters from SetEntProp.
    Let me know if this doesnt do the trick and ill dig out my sourcecode!
    Enjoy
    will2tango is offline
    Master53
    Veteran Member
    Join Date: Dec 2009
    Old 06-23-2010 , 15:39   Re: [ZPS] Carrier / Infected Chat
    Reply With Quote #8

    im getting these errors ?
    PHP Code:
    SetEntData(ClientIsCarrier1); 
    Code:
    L 06/23/2010 - 20:37:23: [SM] Native "SetEntData" reported: Offset -1 is  invalid
    L 06/23/2010 - 20:37:23: [SM] Displaying call stack trace for plugin  "ZPS_Medic.smx":
    L 06/23/2010 - 20:37:23: [SM]   [0]  Line 137,  ZPS_Medic.sp::EventDeath()
    L 06/23/2010 - 20:37:23: [SM] Native "SetEntData" reported: Offset -1 is  invalid
    L 06/23/2010 - 20:37:23: [SM] Displaying call stack trace for plugin  "zps_carrier.smx":
    L 06/23/2010 - 20:37:23: [SM]   [0]  Line 24,  zps_carrier.sp::EventDeath()
    but if i use

    PHP Code:
    SetEntProp(ClientIsCarrier1); 
    i get a missmatch tag error
    __________________
    Master(d)



    Master53 is offline
    will2tango
    Member
    Join Date: Nov 2009
    Location: England
    Old 06-24-2010 , 08:25   Re: [ZPS] Carrier / Infected Chat
    Reply With Quote #9

    ah, the only differance I can see is I use true where you use 1, but i wouldnt imagine that would cause any problems.
    SetEntData(client, IsCarrier, true);

    From your error message the plugin doesnt seem to have picked up the carrier offset properly, double check your "zpsinfectiontoolkit.txt" file in gamedata to make sure you have the IsCarrier offset in there properly, could be a missing } or " possibly.

    Let me know
    will2tango is offline
    Master53
    Veteran Member
    Join Date: Dec 2009
    Old 06-24-2010 , 15:49   Re: [ZPS] Carrier / Infected Chat
    Reply With Quote #10

    Fuck inell man i fucking forgot to update zpsinfectiontoolkit.txt wtf man i wanted to get it working but forgot to update lol. thanks for the heads up. i thought zp team was beying bitches and changing everything... anyway thanks for the help.

    sorry for the 5 year old language tho well i am 5
    __________________
    Master(d)



    Master53 is offline
    Reply


    Thread Tools
    Display Modes

    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 19:43.


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