AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   ID (https://forums.alliedmods.net/showthread.php?t=152584)

KviZ 03-11-2011 14:34

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

Emp` 03-11-2011 14:40

Re: ID
 
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

KviZ 03-11-2011 14:50

Re: ID
 
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...

GXLZPGX 03-11-2011 20:11

Re: ID
 
Quote:

Originally Posted by KviZ (Post 1431574)
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

fysiks 03-11-2011 22:46

Re: ID
 
Quote:

Originally Posted by KviZ (Post 1431574)
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)

KviZ 03-12-2011 02:38

Re: ID
 
Oh now i get it :D


All times are GMT -4. The time now is 14:30.

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