[HELP] Clan Chat
#1

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?
Reply
#2

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

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 !
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)