[FilterScript] Simple AFK Systems With Reason V2
#1

AFK SYSTEMS V2 WITH REASON
Updated:
*Show Player Was AFK TO all Player in the server [ SendclientMessage ]
*Change New String
pawn Код:
#include <a_samp>
#include <streamer>
#include <zcmd>
#define COLOR_YELLOW 0xFFFF00AA
new Text3D:jaja[MAX_PLAYERS] , daadetext3d[MAX_PLAYERS] , textjaja[MAX_PLAYERS][128];
new string1[54];
CMD:afk(playerid,params[])
{
  if(isnull(params)) return SendClientMessage( playerid, -1, "/afk [reason]" );
  if(daadetext3d[playerid] == 1)
  {
    new st[128];
    format(st,sizeof(st),"Player Is AFK|Reason: %s",params);
    textjaja[playerid] = st;
    UpdateDynamic3DTextLabelText(jaja[playerid], 0x00FF40FF,st);
    format(st,sizeof(st),"you has afk with reason: %s use /back to back",params);
    SendClientMessage(playerid,-1,st);
    daadetext3d[playerid] = 1;
    TogglePlayerControllable(playerid,0);
    new name[128];
    GetPlayerName(playerid,name,128);
    format(string1, sizeof(string1), "|Player %s Is AFK!Reason: %s",name,params);
    SendClientMessageToAll(COLOR_YELLOW, string1);
  }
  else
  {
  new st[128];
  format(st,sizeof(st),"Player Is AFK|Reason: %s",params);
  textjaja[playerid] = st;
  jaja[playerid] = CreateDynamic3DTextLabel(st, 0x00FF40FF, 0, 0, 0.6, 50,playerid);
  format(st,sizeof(st),"you has afk with reason: %s use /back to back",params);
  SendClientMessage(playerid,-1,st);
  daadetext3d[playerid] = 1;
  TogglePlayerControllable(playerid,0);
  new name[128];
  GetPlayerName(playerid,name,128);
  format(string1, sizeof(string1), "|Player %s Is AFK!Reason: %s",name,params);
  SendClientMessageToAll(COLOR_YELLOW, string1);
  }
  return 1;
}
CMD:back(playerid,params[])
{
  TogglePlayerControllable(playerid,1);
  DestroyDynamic3DTextLabel(jaja[playerid]);
  daadetext3d[playerid] = 0;
  new name[128];
  GetPlayerName(playerid,name,128);
  SendClientMessage(playerid,-1,"you has used /back");
  format(string1, sizeof(string1), "%s Has Back From AFK!",name);
  SendClientMessageToAll(COLOR_YELLOW, string1);
  return 1;
}
public OnPlayerConnect(playerid)
{
    daadetext3d[playerid] = 0;
    return 1;
}
public OnPlayerDisconnect(playerid, reason)
{
    if(daadetext3d[playerid] == 1)
    {
      DestroyDynamic3DTextLabel(jaja[playerid]);
    }
    return 1;
}
Bug:
*No Founded Bug
If You Found Bug Report To Me!!
Reply
#2

Nice file script
so simple but good job.
i think u must remove the reason in v3
anyway +rep
Reply
#3

Nice, but in the v3 add a GameTextForPlayer

Quote:
Originally Posted by mgd
Nice file script
File script? what was that?
Reply
#4

Quote:

streamer.inc( 338 ) : error 021: symbol already defined: "OnPlayerConnect"

In my case, the server say me that
Reply
#5

Quote:
Originally Posted by PabloDiCostanzo
Посмотреть сообщение
In my case, the server say me that
Maybe Your Pawno Problems ?? i dont have any error
Reply
#6

Quote:
Originally Posted by mgd
Посмотреть сообщение
Nice file script
so simple but good job.
i think u must remove the reason in v3
anyway +rep
Thanks FOR THE REP
Reply
#7

No problem
Reply
#8

i have error Can any fix for me
Reply
#9

i think i would make version 3
Reply
#10

Quote:
Originally Posted by PabloDiCostanzo
Посмотреть сообщение
Quote:

streamer.inc( 338 ) : error 021: symbol already defined: "OnPlayerConnect"

In my case, the server say me that
you need to remove this thing from the filterscipt
Код:
public OnPlayerConnect(playerid)
{
    daadetext3d[playerid] = 0;
    return 1;
}
and Press Ctrl + F and type public "OnPlayerConnect(playerid" and press enter

and give me ur code ill help you.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)