so sad. but atm I just cant explain. too hard to do this from mobile phone
just look
events have a params, right?
one of them - flag event type, type of event
dropped, captured, carried, returned, defended.
eventtype is a numeric value
and I cant remember values of each of them
EDIT:
PHP Code:
public Action:Event_FlagStatus(Handle:hEvent, const String:sName[], bool:bDontBroadcast)
{
new String:sClientAuth[32], String:sQuery[256];
switch(GetEventInt(hEvent, "eventtype"))
{
case 1: // pick up
{
new iClient = GetEventInt(hEvent, "player");
PrintToChatAll("%N has picked up a flag", iClient);
}
case 2: // captured
{
new iClient = GetEventInt(hEvent, "player");
PrintToChatAll("%N has captured a flag", iClient);
}
case 3: // defended
{
new iAttacker = GetEventInt(hEvent, "player");
new iVictim = GetEventInt(hEvent, "carrier");
PrintToChatAll("%N has defended a flag (carried by %N)", iAttacker, iVictim);
}
case 4: // dropped
{
new iClient = GetEventInt(hEvent, "player");
PrintToChatAll("%N has dropped a flag", iClient);
}
case 5: // returned
{
PrintToChatAll("A flag has been return to base", iClient);
}
}
return Plugin_Continue;
}