How to get user's id?
I gave pawn scripting my first shot but I'm struggling to understand about how to get a user's id from entering a command.
I was trying to write a code that will simply give you a shotgun by typing: amx_giveshotgun <name> shotgun Whenever I type in anything anywhere, it goes straight to printing to console "you didn't type 'shotgun'" The entire code is at the bottom. Code:
public plugin_init(){What do I do to set 'id' equal to the user's id so the method is returned to the right player? I have looked at tutorials and other people's codes but none of them talk directly about getting a player's id The code has no trouble compiling, but has trouble working. Code:
#include <amxmodx> |
Re: How to get user's id?
You are doing it wrong.
public giveWeapon(id) and then use read_argv to get the parameters |
Re: How to get user's id?
how would i use read_argv?
make something like new user[32]; read_argv(1,user,31); ?? |
Re: How to get user's id?
Search, there are a few Introduction tutorials out there
|
Re: How to get user's id?
PHP Code:
|
| All times are GMT -4. The time now is 05:55. |
Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.