Цитата ПКнет (
)
любое
Код
#include <sourcemod>
#include <sdktools_functions>
public OnPluginStart() {
RegConsoleCmd("sm_give", Command_Give)
}
public Action:Command_Give(client, args) {
if (client == 0) PrintToChat(client, "Only player");
if (args > 2 || args < 1) {
PrintToChat(client, "[SM] Использовать: !give NickName Weapon_Name");
return Plugin_Handled;
}
new String:weapon[32], sName[MAX_NAME_LENGTH];
GetCmdArg(1, sName, sizeof(sName));
GetCmdArg(2, weapon, sizeof(weapon));
new target = FindTarget(client, sName, false);
if (target == -1) {
PrintToChat(client, "[SM] Игрок не найден");
return Plugin_Handled
}
GivePlayerItem(target, weapon);
return Plugin_Handled;
}