Raised This Month: $ Target: $400
 0% 

ID


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
KviZ
Senior Member
Join Date: Feb 2011
Location: Lithuania
Old 03-11-2011 , 14:34   ID
Reply With Quote #1

On every plugin I see that codes etc. get_user_gravity(id), how does it know which player to pick?

Last edited by KviZ; 03-11-2011 at 14:42.
KviZ is offline
Emp`
AMX Mod X Plugin Approver
Join Date: Aug 2005
Location: Decapod 10
Old 03-11-2011 , 14:40   Re: ID
Reply With Quote #2

Either the forward passes a player into the id parameter, an id is read from existing data, or a player is selected and put into the variable. Some other method could be used also.

It doesn't just "know" which player. I suggest you read https://forums.alliedmods.net/showthread.php?t=94381
Emp` is offline
Send a message via AIM to Emp` Send a message via MSN to Emp` Send a message via Yahoo to Emp` Send a message via Skype™ to Emp`
Old 03-11-2011, 14:42
tRipLe.
This message has been deleted by Emp`. Reason: Please do not reply if you are not sure.
KviZ
Senior Member
Join Date: Feb 2011
Location: Lithuania
Old 03-11-2011 , 14:50   Re: ID
Reply With Quote #3

See I'm not a good scripter and I'm learning and English is not my native language, so it makes me hard to understand things in here, and about ID in that thread I didn't find a good explanation...
KviZ is offline
GXLZPGX
Veteran Member
Join Date: Sep 2009
Old 03-11-2011 , 20:11   Re: ID
Reply With Quote #4

Quote:
Originally Posted by KviZ View Post
See I'm not a good scripter and I'm learning and English is not my native language, so it makes me hard to understand things in here, and about ID in that thread I didn't find a good explanation...
Lol.

Take a look at this:
http://wiki.amxmodx.org/Pawn_Tutorial
__________________
Currently accepting payment US DOLLARS ONLY for custom plugins, contact me through PM.
GXLZPGX is offline
fysiks
Veteran Member
Join Date: Sep 2007
Location: Flatland, USA
Old 03-11-2011 , 22:46   Re: ID
Reply With Quote #5

Quote:
Originally Posted by KviZ View Post
See I'm not a good scripter and I'm learning and English is not my native language, so it makes me hard to understand things in here, and about ID in that thread I didn't find a good explanation...
The variable "id" is just that, a variable. It has no special meaning until you give it one. It could be called "person", "hello", or "asdf" if you wanted it so. It is common for people to name that veriable "id" for a player's entity index which uniquely identifies that person on the current map. (Note the bold)
__________________
fysiks is offline
KviZ
Senior Member
Join Date: Feb 2011
Location: Lithuania
Old 03-12-2011 , 02:38   Re: ID
Reply With Quote #6

Oh now i get it
KviZ 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 14:30.


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