Raised This Month: $61 Target: $400

[ANY] playerpicker.inc

Thread Tools Display Modes
Prev Previous Post   Next Post Next
Author Message
Senior Member
Join Date: May 2020
Old 03-07-2023 , 14:46   [ANY] playerpicker.inc
Reply With Quote #1

Hi, i wrote this inc file for targeted commands (/example @me). If the target is not found or no target was specified, this script can open a menu to the client, to pick a player from a list using PickPlayer().
There is an example in the gist, that might be outdated, but it should be a good reference.

Actual usage would be:
PHP Code:
void callback(int resultint userid) {
int client GetClientOfUserId(userid);
    if (!
client || !result) return; //result 0 = cancelled by user/menu timeout
if (result 0PrintToChat(client"Target error"); // <0 are target COMMAND_TARGET_* values
doWhatever(result); //result = client index
PickPlayer(clientCOMMAND_FILTER_*, callbackGetClientUserId(client)); 
Plugins & LibrariesListing GitHubDosMike Tools ▶ ToDo
reBane is offline

Thread Tools
Display Modes

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 05:31.

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