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

Ski 2 Shop v1.7.1


Post New Thread Reply   
 
Thread Tools Display Modes
wrecked_
Veteran Member
Join Date: Jan 2010
Location: New York (GMT-5)
Old 02-19-2010 , 19:20   Re: Ski 2 Shop v1.2 (Updated!)
Reply With Quote #21

Pssssst; I think you forgot to take out your function that you used to test and fix up the origins.
PHP Code:
public printPos(id) {
    new 
origins[3];
    
get_user_origin(idorigins);
    
client_print(idprint_chat"origins: (%d,%d,%d)"origins[0], origins[1], origins[2]);

__________________
[ Paid Requests ]
DO NOT PM ME ABOUT BLOCKMAKER
NO PRIVATE SUPPORT
wrecked_ is offline
Seta00
The Seta00 user has crashed.
Join Date: Jan 2010
Location: Berlin
Old 02-19-2010 , 19:47   Re: Ski 2 Shop v1.2 (Updated!)
Reply With Quote #22

Quote:
Originally Posted by Arkshine View Post
Why register_message() is used ? You don't even block the message.
Because I can't access (I'm not sure, but I've tested with register_event and it didn't work) the entity the message is destined to with register_event, since ItemPickup is a global event. With register_message(), I can find the entity netname, and then find the corresponding player.

Quote:
Originally Posted by wrecked_ View Post
Pssssst; I think you forgot to take out your function that you used to test and fix up the origins.
}
It's removed. I always forget something when I'm gonna upload.

EDIT: By the way, v1.3 is coming in a few minutes.

Last edited by Seta00; 02-19-2010 at 20:14.
Seta00 is offline
Old 02-19-2010, 20:03
Arkshine
This message has been deleted by Arkshine. Reason: nvm
Arkshine
AMX Mod X Plugin Approver
Join Date: Oct 2005
Old 02-19-2010 , 20:15   Re: Ski 2 Shop v1.2 (Updated!)
Reply With Quote #23

ItemPickup is not a global event.
__________________
Arkshine is offline
Seta00
The Seta00 user has crashed.
Join Date: Jan 2010
Location: Berlin
Old 02-19-2010 , 20:20   Re: Ski 2 Shop v1.2 (Updated!)
Reply With Quote #24

It doesn't have player id in its arguments.
Seta00 is offline
Exolent[jNr]
Veteran Member
Join Date: Feb 2007
Location: Tennessee
Old 02-19-2010 , 20:21   Re: Ski 2 Shop v1.2 (Updated!)
Reply With Quote #25

Quote:
Originally Posted by Seta00 View Post
It doesn't have player id in its arguments.
Player id is passed into the message header.

Code:
message_begin( MSG_ONE, g_iMsgID_ItemPickup, _, iPlayer ); ... message_end( );
__________________
No private work or selling mods.
Quote:
Originally Posted by xPaw View Post
I love you exolent!
Exolent[jNr] is offline
Arkshine
AMX Mod X Plugin Approver
Join Date: Oct 2005
Old 02-19-2010 , 20:27   Re: Ski 2 Shop v1.2 (Updated!)
Reply With Quote #26

register_event( "ItemPickup", "Event_ItemPickup", "be" );

public Event_ItemPickup ( const player )
{
// arg 1, item name.
}
__________________
Arkshine is offline
Seta00
The Seta00 user has crashed.
Join Date: Jan 2010
Location: Berlin
Old 02-19-2010 , 21:06   Re: Ski 2 Shop v1.3 (Updated!)
Reply With Quote #27

Worked perfectly, and I was able to remove fakemeta dependency.
Thank you!
Seta00 is offline
Seta00
The Seta00 user has crashed.
Join Date: Jan 2010
Location: Berlin
Old 02-19-2010 , 21:07   Re: Ski 2 Shop v1.3 (Updated!)
Reply With Quote #28

Updated

v1.3 Hot New Features:
+ Fixed bug: After your item expires, every round the "lost item" message is printed.
+ Added items' duration cvars.
+ Removed fakemeta dependency - Thanks Arkshine!
+ More optimizations
* Improved source code organization

If you have any suggestion for a new item, please post it.

Ski 2 Shop v1.3 by Seta00

Note: The attached file is for version control/backup purpose. The first post has always the most recent version of the plugin.
Attached Files
File Type: sma Get Plugin or Get Source (ski2_shop.sma - 539 views - 19.7 KB)

Last edited by Seta00; 02-20-2010 at 11:47.
Seta00 is offline
MouseSplash!
Veteran Member
Join Date: Dec 2009
Location: En Tu Mente!
Old 02-20-2010 , 00:26   Re: Ski 2 Shop v1.3 (Updated!)
Reply With Quote #29

CANT_BUY_ITEM = You already got this item!
Code:
[es]
CANT_BUY_ITEM = Tu ya tienes este item!
MouseSplash! is offline
Seta00
The Seta00 user has crashed.
Join Date: Jan 2010
Location: Berlin
Old 02-20-2010 , 06:03   Re: Ski 2 Shop v1.3 (Optimized!)
Reply With Quote #30

Thanks MouseSplash!, my Spanish sucks
Seta00 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 15:17.


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