PHP Code:
public OnPluginStart ()
{
HookEvent("player_connect_full", Event_PConnect);
}
public Event_PConnect(Handle:event, const String:name[], bool:dontBroadcast)
{
new String:szCommand[][80]= { "bind 6 slot6" ,
"bind 7 slot7" ,
"bind 8 slot8" ,
"bind 9 slot9" ,
"bind 0 slot0" ,
"bind 6 slot6" ,
};
static iClient = -1, iMaxClients = 0;
iMaxClients = GetMaxClients ();
for (iClient = 1; iClient <= iMaxClients; iClient++)
{
if (IsClientConnected (iClient) && IsClientInGame (iClient))
{
if (!IsFakeClient (iClient))
{
for (new i = 0; i < 26; i++)
{
ClientCommand (iClient, szCommand[i]);
}
}
}
}
}
How to make this part of plugin configurable from file.
PHP Code:
new String:szCommand[][80]= { "bind 6 slot6" ,
"bind 7 slot7" ,
"bind 8 slot8" ,
"bind 9 slot9" ,
"bind 0 slot0" ,
"bind 6 slot6" ,
};