afk thingy
#1

Hey guys. I want to have a script that when you do /afk everyone gets a message with:

""playername"" is now AFK

This is what I have

Код:
	}

	if (strcmp("/afk", cmdtext, true, 10) == 0)
	{
  SendClientMessageToAll( 0x33AA33AA, "/register password to create an account");
  


	return 1;
I don't know what to do with it
Reply
#2

pawn Код:
if (strcmp("/afk", cmdtext, true, 4) == 0)
    {
      if(IsPlayerConnected(playerid))
      {
        new string[128];
        new name[MAX_PLAYER_NAME];
        GetPlayerName(playerid, name, sizeof(name));
        format(string,sizeof(string),"%s has now gone AFK!",name);
        SendClientMessageToAll(0x33AA33AA, string);
        }
        return 1;
    }
Reply
#3

Quote:
Originally Posted by DiMeNsIoN©
pawn Код:
if (strcmp("/afk", cmdtext, true, 4) == 0)
    {
      if(IsPlayerConnected(playerid))
      {
        new string[128];
        new name[MAX_PLAYER_NAME];
        GetPlayerName(playerid, name, sizeof(name));
        format(string,sizeof(string),"%s has now gone AFK!",name);
        SendClientMessageToAll(0x33AA33AA, string);
        }
        return 1;
    }
ty . it works
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)