Raised This Month: $ Target: $400
 0% 

[ANY] Gifts!


Post New Thread Reply   
 
Thread Tools Display Modes
Muscle Brazil
Senior Member
Join Date: Apr 2009
Location: Brazil
Old 10-05-2017 , 21:29   Re: [ANY] Gifts!
Reply With Quote #31

is work on csgo??
Muscle Brazil is offline
paulo_crash
AlliedModders Donor
Join Date: May 2016
Location: Brazil
Old 05-07-2018 , 20:15   Re: [ANY] Gifts!
Reply With Quote #32

Quote:
Originally Posted by Muscle Brazil View Post
is work on csgo??
I'm using CSGO and it works fine, just set it up properly.

I only have one doubt, for my servers the gifts of credits are being very high, would I have to reduce these gifts values?
paulo_crash is offline
Laser32
AlliedModders Donor
Join Date: Sep 2006
Location: Germany (Schwerin)
Old 10-20-2019 , 11:35   Re: [ANY] Gifts!
Reply With Quote #33

Quote:
gifts.smx ([ANY] Gifts): unexpected error 23 in AskPluginLoad callback
pls help
Laser32 is offline
Laser32
AlliedModders Donor
Join Date: Sep 2006
Location: Germany (Schwerin)
Old 10-21-2019 , 12:12   Re: [ANY] Gifts!
Reply With Quote #34

PHP Code:
extra/zephstocks.inc(398) : warning 219local variable "timer" shadows a variable at a preceding level
extra
/zephstocks.inc(460) : warning 219local variable "timer" shadows a variable at a preceding level
Cannot enlarge memory arrays
Either (1compile with  -s TOTAL_MEMORY=X  with X higher than the current value 16777216, (2compile with  -s ALLOW_MEMORY_GROWTH=1  which allows increasing the size at runtime but prevents some optimizations, (3set Module.TOTAL_MEMORY to a higher value before the program runs, or (4) if you want malloc to return NULL (0instead of this abortcompile with  -s ABORTING_MALLOC=
Cannot enlarge memory arrays
Either (1compile with  -s TOTAL_MEMORY=X  with X higher than the current value 16777216, (2compile with  -s ALLOW_MEMORY_GROWTH=1  which allows increasing the size at runtime but prevents some optimizations, (3set Module.TOTAL_MEMORY to a higher value before the program runs, or (4) if you want malloc to return NULL (0instead of this abortcompile with  -s ABORTING_MALLOC=
exception thrown
abort("Cannot enlarge memory arrays. Either (1) compile with  -s TOTAL_MEMORY=X  with X higher than the current value 16777216, (2) compile with  -s ALLOW_MEMORY_GROWTH=1  which allows increasing the size at runtime but prevents some optimizations, (3) set Module.TOTAL_MEMORY to a higher value before the program runs, or (4) if you want malloc to return NULL (0) instead of this abort, compile with  -s ABORTING_MALLOC=0 "). Build with -s ASSERTIONS=for more info

Last edited by Laser32; 10-21-2019 at 12:12.
Laser32 is offline
Failip2
New Member
Join Date: Dec 2020
Old 12-13-2020 , 07:50   Re: [ANY] Gifts!
Reply With Quote #35

I cant seem to get the model for the gift set up. Anyone know if it still works, if so how can i do it? (EDIT: Its for a csgo server)

Last edited by Failip2; 12-13-2020 at 07:50.
Failip2 is offline
Golbanux
Member
Join Date: Apr 2020
Location: Romānia
Old 01-10-2021 , 15:12   Re: [ANY] Gifts!
Reply With Quote #36

If anyone have a final plugin to work please dm me! <3
__________________
Golbanux is offline
azalty
AlliedModders Donor
Join Date: Feb 2020
Location: France
Old 04-25-2022 , 18:51   Re: [ANY] Gifts!
Reply With Quote #37

Modified the plugin for my private needs, but here it is.
Includes some changes and fixes:

Version 3.1 by azalty (from 2.3 by Zephyrus):

- added a collision fix: prop_dynamic_override is now used instead of prop_physics_override, and collisions are now manually set. You can now set the collision box (square) in the config file.
Quote:
// Size of the gift collision box in hammer/csgo units.
// -
// Default: "20"
sm_gifts_size "20"
20 means a box of 20x20 units

- added the default gift model for csgo (same as css)

- fixed a bug with the saving of the gift's position

- fixed gifts being duplicated (can't remember the details to be honest)

- added a forward: Gifts_OnClientGrabGift which passes the client and the entity indexes and allows you to block the event (the client won't be able to grab the gift if you return Plugin_Handled)
Quote:
/**
* Called when a client tries to grab a gift.
*
* @param client The client index.
* @param entity The gift entity index.
* @return Return Plugin_Handled to block the grabbing & Plugin_Continue to let the client grab.
* If any plugin returns Plugin_Handled, the client won't be able to grab.
*/
forward Action Gifts_OnClientGrabGift(int client, int entity);

These fixes won't be useful to everyone, I know, but since there is a small chance that someone might need this, I'll post the plugin.

Plugin compiled with SM 1.7 (I think) - it doesn't compile on SM 1.10 but will work fine on a SM 1.10 and + server
Attached Files
File Type: sp Get Plugin or Get Source (gifts.sp - 99 views - 13.6 KB)
File Type: smx gifts.smx (34.7 KB, 109 views)
File Type: inc gifts.inc (1.5 KB, 65 views)
__________________
GitHub | Discord: @azalty | Steam
azalty is offline
PLTAT
Member
Join Date: Apr 2023
Old 05-24-2024 , 19:26   Re: [ANY] Gifts!
Reply With Quote #38

Quote:
Originally Posted by azalty View Post
Modified the plugin for my private needs, but here it is.
Includes some changes and fixes:

Version 3.1 by azalty (from 2.3 by Zephyrus):

- added a collision fix: prop_dynamic_override is now used instead of prop_physics_override, and collisions are now manually set. You can now set the collision box (square) in the config file.

20 means a box of 20x20 units

- added the default gift model for csgo (same as css)

- fixed a bug with the saving of the gift's position

- fixed gifts being duplicated (can't remember the details to be honest)

- added a forward: Gifts_OnClientGrabGift which passes the client and the entity indexes and allows you to block the event (the client won't be able to grab the gift if you return Plugin_Handled)



These fixes won't be useful to everyone, I know, but since there is a small chance that someone might need this, I'll post the plugin.

Plugin compiled with SM 1.7 (I think) - it doesn't compile on SM 1.10 but will work fine on a SM 1.10 and + server
compile 1.12.0_7136
----
// error 153: Array-based enum structs have been removed. See https://wiki.alliedmods.net/SourcePa...x#Enum_Structs
// 38 | Handle:hCvar,
// ----------^
//
// error 153: Array-based enum structs have been removed. See https://wiki.alliedmods.net/SourcePa...x#Enum_Structs
// 11 | Handle:hPlugin,
// ----------^
//
// error 153: Array-based enum structs have been removed. See https://wiki.alliedmods.net/SourcePa...x#Enum_Structs
// 17 | Handle:hPlugin,
// ----------^
//
// 3 Errors.
__________________
---- Signature Start ----
Web not i18n
My English poor
---- Signature End ----

Last edited by PLTAT; 05-24-2024 at 19:32.
PLTAT is offline
PLTAT
Member
Join Date: Apr 2023
Old 05-24-2024 , 19:35   Re: [ANY] Gifts!
Reply With Quote #39

Quote:
Originally Posted by Despirator View Post
code your plugin


example in attach
compile 1.12.0_7136
----
error 035: argument type mismatch (argument 1)
// 21 | Gifts_RegisterPlugin("Gifts_ClientPickUp");
// -------------------------------^
//
// 1 Error.
----
"" is not need
----
lost morecolors.inc
https://github.com/DoctorMcKay/sourc...morecolors.inc
----
[SM] Unable to load plugin "gifts_test.smx": Native "Gifts_RegisterPlugin" was not found
Attached Files
File Type: sp Get Plugin or Get Source (gifts_test.sp - 4 views - 806 Bytes)
__________________
---- Signature Start ----
Web not i18n
My English poor
---- Signature End ----

Last edited by PLTAT; 05-30-2024 at 20:38. Reason: add error log
PLTAT is offline
PLTAT
Member
Join Date: Apr 2023
Old 05-24-2024 , 19:40   Re: [ANY] Gifts!
Reply With Quote #40

Quote:
Originally Posted by Zephyrus View Post
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
compile 1.12.0_7136
----
error 035: argument type mismatch (argument 1)
// 18 | Gifts_RegisterPlugin("Gifts_ClientPickUp");
// -------------------------------^
//
// 1 Error.
----
look like you add "" is not good, i delete it
Attached Files
File Type: sp Get Plugin or Get Source (zgifts_test.sp - 6 views - 491 Bytes)
__________________
---- Signature Start ----
Web not i18n
My English poor
---- Signature End ----
PLTAT 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 21:09.


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