smoke96
Участник
- Сообщения
- 1,134
- Реакции
- 175
В логах:
L 03/24/2015 - 12:06:45: SourceMod error session started
L 03/24/2015 - 12:06:45: Info (map "$2000$") (file "errors_20150324.log")
L 03/24/2015 - 12:06:45: [SM] Native "PrintToChat" reported: Client 2 is not in game
L 03/24/2015 - 12:06:45: [SM] Displaying call stack trace for plugin "Rank Info - Smoke.smx":
L 03/24/2015 - 12:06:45: [SM] [0] Line 20, R:\Server Full\Sourcemod\addons\sourcemod\scripting\Rank Info - Smoke.sp::RankCallback()
Код плагина:
L 03/24/2015 - 12:06:45: SourceMod error session started
L 03/24/2015 - 12:06:45: Info (map "$2000$") (file "errors_20150324.log")
L 03/24/2015 - 12:06:45: [SM] Native "PrintToChat" reported: Client 2 is not in game
L 03/24/2015 - 12:06:45: [SM] Displaying call stack trace for plugin "Rank Info - Smoke.smx":
L 03/24/2015 - 12:06:45: [SM] [0] Line 20, R:\Server Full\Sourcemod\addons\sourcemod\scripting\Rank Info - Smoke.sp::RankCallback()
Код плагина:
PHP:
#include <rankme>
public OnPluginStart(){HookEvent("player_spawn", Event_PS);}
public Event_PS(Handle: event , const String: name[] , bool: dontBroadcast)
{
new clientID = GetEventInt(event,"userid");
new client = GetClientOfUserId(clientID);
RankMe_GetRank(client,RankCallback);
}
public RankCallback(client, rank, any:data)
{
PrintToChat(client, "\x04[RANK-ME]\x01 Вы сейчас на \x03%d\x01 месте с \x03%d\x01 очками.",rank,RankMe_GetPoints(client));
}