11.11.2014, 10:47
So i'm new to pawno and i tried to make command /me, /do and /b (OOC).
Can u plss help me ?
Can u plss help me ?
CMD:me(playerid, params[])
{
new Action;
if(sscanf(params,"i", Action)) return SendClientMessage(playerid, 0xFF0000FF, "USAGE: /me [action]");
new str[128];
new name[MAX_PLAYER_NAME], string[24+MAX_PLAYER_NAME];
GetPlayerName(playerid, name, sizeof(name));
format(str, sizeof(str), "* %s %s", str, name, Action);
SendClientMessageToAll(0xFFFF00AA, str);
return 1;
}
CMD:do(playerid, params[])
{
new, string[128], action[100];
if(sscanf(params, "s[100]", action))
{
SendClientMessage(playerid, -1, "USAGE: /do [action]");
return 1;
}
else
{
format(string, sizeof(string), "* %s (( %s ))", action, GetName(playerid));
ProxDetector(30, playerid, string, COLOR_PURPLE);
}
return 1;
}
CMD:b(playerid, params[])
{
new str[128];
new OOC;
if(sscanf(params,"i", OOC)) return SendClientMessage(playerid, 0xFF0000FF, "USAGE: /b [OOC Chat]");
new name[MAX_PLAYER_NAME], string[24+MAX_PLAYER_NAME];
GetPlayerName(playerid, name, sizeof(name));
format(str, sizeof(str), "%s ((%s))", name, OOC);
SendClientMessageToAll (COLOR_WHITE, str);
return 1;
}