How can I turn this into Local OOC?
#1

As the title says, how can I trun this /ooc into /local ?

Код:
if(!strcmp(cmdtext, "/ooc", true, 3))
	{
		new str[256], pname[256];
		GetPlayerName(playerid, pname, 256);
		format(str, 256, "(( Ooc: %s:%s ))", pname, cmdtext[4]);
		SendClientMessageToAll(0xFFFFFFAA, str);
        return 1;
	}
}
Reply
#2

You'll need to use a loop with something like IsPlayerInArea, or PlayerToPos/PlayerToPlayer to see if the player is within range.
Reply
#3

Use ProxDetector function from godfather. It's quite good
Reply
#4

A little Bug fix. The bug is, that when you type /occ this would pop up. "((Ooc: Emanuel_Rodriguez)" it would say this when you just type /occ "USAGE: /ooc [message]". So here you go and have fun with it!

pawn Код:
public OnPlayerCommandText(playerid, cmdtext[])
{
    if(!strcmp(cmdtext, "/ooc", true, 4))
    {
        if(!cmdtext[4])return SendClientMessage(playerid, 0xFF0000FF, "USAGE: /ooc [message]");
        new str[256], pname[256];
        GetPlayerName(playerid, pname, 256);
        format(str, 256, "(( Ooc: %s:%s ))", pname, cmdtext[4]);
        SendClientMessageToAll(COLOR_BLUE, str);
        return 1;
    }
    return 0;
}
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)