SA-MP Forums Archive
[HELP] Clan Chat - 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: [HELP] Clan Chat (/showthread.php?tid=142277)



[HELP] Clan Chat - Gummy Bear - 17.04.2010

Sup guys, I'm really new to scripting and i always try some hard things, so here is what im trying to do.

I want to do like an IRC channel, but due that I'm on a ''Roleplay'' script, i want to make a kind of IRC In-Character, named /clan.

Here is my cmd

Код:
  ///////////////WALKIE TALKIE TEST////////////////////
  	if(strcmp(cmd, "/clan", true) == 0 || strcmp(cmd, "/c", true) == 0)
  {
    if(IsPlayerConnected(playerid))
    {
      GetPlayerName(playerid, sendername, sizeof(sendername));
      new length = strlen(cmdtext);
      while ((idx < length) && (cmdtext[idx] <= ' '))
      {
        idx++;
      }
      new offset = idx;
      new result[64];
      while ((idx < length) && ((idx - offset) < (sizeof(result) - 1)))
      {
        result[idx - offset] = cmdtext[idx];
        idx++;
      }
      result[idx - offset] = EOS;
      if(!strlen(result))
      {
        SendClientMessage(playerid, COLOR_GRAD2, "USAGE: (/c)lan [clan chat]");
        return 1;
      }
      
  /////CLAN JOIN////
  if(strcmp(cmd,"/clanjoin, true) == 0 || strcmp(cmd, "/cj", true) == 0)
 {
	if(IsPlayerConnected(playerid))
  {

  new channel = strval(tmp);
  if(channel < 1 || channel > 3000) { SendClientMessage(playerid, COLOR_GREY, "  Clan Number can only be below 1 and 3000 !"); return 1; }
  channel -= 1;
    {
        SendClientMessage(playerid, COLOR_GRAD2, "USAGE: /©lan(j)oin [clan channel #]");
        return 1;
    }
	//////////////////
Would it work?


Re: [HELP] Clan Chat - Dolph - 17.04.2010

There's only one way to find out if it works or not; "Test it" :P


Re: [HELP] Clan Chat - Gummy Bear - 17.04.2010

Nevermind, i failed on this, Right now i would like to request something like this.

A type of /clan chat, and you can /join <channel nr> etc like an IRC.

Thanks in advance !