Hi, im have a problem with my plugin.
If nobody was disconnected
] sm_last
No se desconecto ningun jugador en este mapa!
If someone disconnects
] sm_last
Unknown command: sm_last
Code:
SourcePawn Compiler 1.7.1
Copyright (c) 1997-2006 ITB CompuPhase
Copyright (c) 2004-2014 AlliedModders LLC
/home/groups/sourcemod/upload_tmp/phpjiIlMy.sp(39) : warning 213: tag mismatch (Info[j][LastID]=GetSteamAccountID(client);)
Code size: 3348 bytes
Data size: 18592 bytes
Stack/heap size: 16384 bytes
Total requirements: 38324 bytes
1 Warning.
Code:
#include <sourcemod>
int j=0;//cantidad de jugadores desconectados
public Plugin myinfo ={
name = "sm_last",
author = "SnMaxx",
description = "Ultimos jugadores desconectados",
version = "1.0",
url = "http://www.sourcemod.net/"
};
public void OnPluginStart(){
RegConsoleCmd("sm_last", print_lastdisconnect);
}
enum pInfo{
string:LastID[30],
string:LastNM[50],
};
new Info[50][pInfo];
public Action:print_lastdisconnect(int client, int args){
if(j==0){
PrintToConsole(client, "No se desconecto ningun jugador en este mapa!");
return Plugin_Handled;
}
for(int i=0;i<j;i++){
PrintToConsole(client,"%s",Info[i-1][LastID]);
}
return Plugin_Handled;
}
public void OnClientDisconnect(int client){
Info[j][LastID]=GetSteamAccountID(client);
j++;
}
Sorry for my bad english, and thanks