In this topic, I'll post some codes I'll create for you to understand how this language works.
(NOTE: These codes might not work as intended and might need some changes!)
1. If the player has "Leaks" in their name, it sends a welcoming message to them, eitherway, it sets their health to 200:
#include <sourcemod>
public Action:ClientConnect(int client)
{
char name[MAX_PLAYER_NAME+1];
GetClientName(client, name, sizeof(name));
if (strstr(name, "Leaks") != NULL)
{
char msg[128];
format(msg, sizeof(msg), "Welcome to the server, %s! Enjoy your stay.", name);
ShowSyncTextMsg(client, 1, msg);
}
else
{
SetEntProp(client, Prop_Send, "m_iHealth", 200);
}
return Plugin_Continue;
}