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

[ANY] Gifts!


Post New Thread Reply   
 
Thread Tools Display Modes
Author
Zephyrus
Cool Pig B)
Join Date: Jun 2010
Location: Hungary
Plugin ID:
2750
Plugin Version:
Plugin Category:
Fun Stuff
Plugin Game:
Any
Plugin Dependencies:
    Servers with this Plugin:
     
    Plugin Description:
    Gifts :333
    Old 12-31-2011 , 11:06   [ANY] Gifts!
    Reply With Quote #1

    Gifts. 'Nuff said. Not much yet, I hope a few people will code plugins for it.

    CVars
    sm_gifts_lifetime - Lifetime of the gifts Def: 10.0
    sm_gifts_chance - Chance of dropping gifts Def: 0.60
    sm_gifts_model - Model of the gift - Def: mod dependant

    Stuff for developers
    PHP Code:
    native Gifts_RegisterPlugin(Function:callback);
    native Gifts_RemovePlugin();
    native Gifts_SetClientCondition(clientGiftConditions:clientState);
    native Gifts_GetClientCondition(client);
    native Gifts_SpawnGift(Function:callback, const String:model[], Float:lifetimeFloat:position[3], dataowner=0); 
    There's a test plugin in the attachments.

    Stuff for server admins
    Checks addons, although there's not much yet.

    Addons
    I'll post any gift plugin here, just PM me with URL.

    Changelog
    2.4 - Lot of fixes
    2.3 - Fixed a lame bug hopefully
    2.2 - Fixed a possible bug
    2.1 - Some small changes
    2.0 - Fixed bugs, added new features for developers, made it overally better
    1.2 - Added a few extra natives, gifts are rotating and floating, just like the ones during the Valve Gift Grab
    1.1 - I shouldn't be submitting new plugins drunk
    Attached Files
    File Type: sp Get Plugin or Get Source (zgifts_test.sp - 2350 views - 493 Bytes)
    File Type: smx zgifts_test.smx (2.4 KB, 2324 views)
    File Type: inc zephstocks.inc (32.4 KB, 2652 views)
    File Type: inc gifts.inc (1.1 KB, 2771 views)
    File Type: sp Get Plugin or Get Source (gifts.sp - 3403 views - 10.3 KB)
    File Type: smx gifts.smx (38.0 KB, 4409 views)
    __________________
    Taking private C++/PHP/SourcePawn requests, PM me.

    Last edited by Zephyrus; 08-08-2014 at 08:37.
    Zephyrus is offline
    341464
    Senior Member
    Join Date: Dec 2010
    Location: GetClientEyePosition
    Old 12-31-2011 , 12:16   Re: [ANY] Gifts!
    Reply With Quote #2

    I don't get it. I haven't try though.
    341464 is offline
    Send a message via Skype™ to 341464
    Horsedick
    AlliedModders Donor
    Join Date: Sep 2011
    Old 12-31-2011 , 12:40   Re: [ANY] Gifts!
    Reply With Quote #3

    Yeah I don't understand what the purpose is here? Please explain a little more instead of "gifts, nuff said".
    Horsedick is offline
    JackieChan
    AlliedModders Donor
    Join Date: Nov 2009
    Old 12-31-2011 , 15:51   Re: [ANY] Gifts!
    Reply With Quote #4

    Judging by the source, you know those gift grab achievements Valve is doing for like CS, TF2, L4D2, etc.? It spawns those so people can build plugins around them because I don't think there are actual game events for dropped presents. This plugin makes it so there is.
    __________________

    Last edited by JackieChan; 12-31-2011 at 15:55.
    JackieChan is offline
    Zephyrus
    Cool Pig B)
    Join Date: Jun 2010
    Location: Hungary
    Old 01-01-2012 , 05:08   Re: [ANY] Gifts!
    Reply With Quote #5

    oh sry i was a *bit* drunk when i posted this o.o. Basically this is an extendable gifts api. Plugins can register themselves. Those plugins will be the presents and when a player picks up a gift a plugin will be randomly selected to handle it.
    __________________
    Taking private C++/PHP/SourcePawn requests, PM me.

    Last edited by Zephyrus; 01-01-2012 at 05:22.
    Zephyrus is offline
    Zephyrus
    Cool Pig B)
    Join Date: Jun 2010
    Location: Hungary
    Old 01-01-2012 , 07:53   Re: [ANY] Gifts!
    Reply With Quote #6

    next week Ill post a plugin that actually makes use of this with a few presents
    __________________
    Taking private C++/PHP/SourcePawn requests, PM me.
    Zephyrus is offline
    Thrawn2
    Veteran Member
    Join Date: Apr 2009
    Old 01-02-2012 , 06:22   Re: [ANY] Gifts!
    Reply With Quote #7

    This is a bit lacking it seems. As i am currently writing something very similar myself (actually rewriting psyRTD with the suggestions in the thread) i'm pretty much into the topic currently. A few questions/notes/hints:
    • How does a gift-plugin know that sm_gifts_lifetime is over?
    • Also: not every effect might be able to obey the lifetime rule, so you need another type of gift that notifies the core that the effect is over.
    • What happens when someone is picking up a second gift while still under the effect of the first? Does both effects happen at the same time (it is safe to assume there will be incompatibilities between effects)?
    • What happens when an effect has to be stopped ahead of time? E.g. when a player disconnects or dies - how does the plugin know to stop the effect?
    • It might be easier for players to understand what's going on if effects have a name (or even a short description).
    • Plus: all the suggestions i've made on the linked thread.
    __________________
    einmal mit profis arbeiten. einmal.
    Thrawn2 is offline
    Zephyrus
    Cool Pig B)
    Join Date: Jun 2010
    Location: Hungary
    Old 01-02-2012 , 14:37   Re: [ANY] Gifts!
    Reply With Quote #8

    Quote:
    Originally Posted by Thrawn2 View Post
    This is a bit lacking it seems. As i am currently writing something very similar myself (actually rewriting psyRTD with the suggestions in the thread) i'm pretty much into the topic currently. A few questions/notes/hints:
    • How does a gift-plugin know that sm_gifts_lifetime is over?
    • Also: not every effect might be able to obey the lifetime rule, so you need another type of gift that notifies the core that the effect is over.
    • What happens when someone is picking up a second gift while still under the effect of the first? Does both effects happen at the same time (it is safe to assume there will be incompatibilities between effects)?
    • What happens when an effect has to be stopped ahead of time? E.g. when a player disconnects or dies - how does the plugin know to stop the effect?
    • It might be easier for players to understand what's going on if effects have a name (or even a short description).
    • Plus: all the suggestions i've made on the linked thread.
    lifetime is the time before the gift disappears if noone picks it up, also i think the individual presents can take care of the end of the effect, but adding a few natives to report when an effect has worn off seems reasonable, also maybe a cvar to set whether more gifts can be picked up by the same person while an effect is active
    __________________
    Taking private C++/PHP/SourcePawn requests, PM me.
    Zephyrus is offline
    ozgaming
    SourceMod Donor
    Join Date: Aug 2011
    Old 01-08-2012 , 08:30   Re: [ANY] Gifts!
    Reply With Quote #9

    Interested.

    Is there anyway for the plugin to read from a text file for example when some picks up a gift? It would then read a random line out of the file and display it on the server
    ozgaming is offline
    ozgaming
    SourceMod Donor
    Join Date: Aug 2011
    Old 01-09-2012 , 04:00   Re: [ANY] Gifts!
    Reply With Quote #10

    Quote:
    Originally Posted by ozgaming View Post
    Interested.

    Is there anyway for the plugin to read from a text file for example when some picks up a gift? It would then read a random line out of the file and display it on the server
    Maybe someone could code this? I'm willing to pay
    ozgaming 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 02:22.


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