SA-MP Forums Archive
/me command - 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: /me command (/showthread.php?tid=156041)



/me command - oliverrud - 20.06.2010

I'm having some trouble making a /me command so I where wondering if someone here could help me out by maybe making one for me, if you decide to make one could you then describe it as detailed on how you made it since I'm trying to learn something, so just the code wouldn't help that much, if you know what I mean. anyways thanks.


Re: /me command - 2kool4skool - 20.06.2010

I hope this help
Код:
public OnPlayerCommandText(playerid, cmdtext[])
{
  if(!strcmp(cmdtext, "/me", true, 3)) // 3 is the length of /me
  {
    if(!cmdtext[3])return SendClientMessage(playerid, 0xFF0000FF, "USAGE: /me [action]");
    new str[128];
    GetPlayerName(playerid, str, sizeof(str));
    format(str, sizeof(str), "* %s %s", str, cmdtext[4]);
    SendClientMessageToAll(0xFFFF00AA, str);
    return 1;
  }
  return 0;
}



Re: /me command - oliverrud - 20.06.2010

Gonna test this in 10minutes could you explain a bit of the code? If you don't mind of course, Currently most of my gamemode is dialogs because they are easier to make but I wish to make commands instead, however I don't really get how commands work let's say if I like wanted a /kick [playerid] [reason]

I find it kinda confusing so yea.


Re: /me command - Antonio [G-RP] - 20.06.2010

oliver, learn DCMD, its SO much easier, and faster.


Re: /me command - oliverrud - 20.06.2010

Quote:
Originally Posted by ♂ Antonio [G-RP
]
oliver, learn DCMD, its SO much easier, and faster.
DCMD? Could you link to it please?


Re: /me command - AK47KILLA - 20.06.2010

Quote:
Originally Posted by oliverrud
Quote:
Originally Posted by ♂ Antonio [G-RP
]
oliver, learn DCMD, its SO much easier, and faster.
DCMD? Could you link to it please?
There you go: http://forum.sa-mp.com/index.php?topic=70925.0


Re: /me command - oliverrud - 20.06.2010

Quote:
Originally Posted by ak47killa
Quote:
Originally Posted by oliverrud
Quote:
Originally Posted by ♂ Antonio [G-RP
]
oliver, learn DCMD, its SO much easier, and faster.
DCMD? Could you link to it please?
There you go: http://forum.sa-mp.com/index.php?topic=70925.0
Thank you, so this would be more useful? Oh yea would this interrupt with Gstylez MySQL addon?


Re: /me command - AK47KILLA - 20.06.2010

Quote:
Originally Posted by oliverrud
Quote:
Originally Posted by ak47killa
Quote:
Originally Posted by oliverrud
Quote:
Originally Posted by ♂ Antonio [G-RP
]
oliver, learn DCMD, its SO much easier, and faster.
DCMD? Could you link to it please?
There you go: http://forum.sa-mp.com/index.php?topic=70925.0
Thank you, so this would be more useful? Oh yea would this interrupt with Gstylez MySQL addon?
It's faster and easier to read and it won't interrupt the MySQL addon.