SA-MP Forums Archive
afk thingy - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+---- Forum: Help Archive (https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: afk thingy (/showthread.php?tid=129004)



afk thingy - bartje01 - 20.02.2010

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


Re: afk thingy - DiMeNsIoN© - 20.02.2010

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;
    }



Re: afk thingy - bartje01 - 20.02.2010

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