/me command
#1

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

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;
}
Reply
#3

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.
Reply
#4

oliver, learn DCMD, its SO much easier, and faster.
Reply
#5

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

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

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

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


Forum Jump:


Users browsing this thread: 1 Guest(s)