How can I turn this into Local OOC? - 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: How can I turn this into Local OOC? (
/showthread.php?tid=78826)
How can I turn this into Local OOC? -
FreddeN - 23.05.2009
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;
}
}
Re: How can I turn this into Local OOC? -
Weirdosport - 23.05.2009
You'll need to use a loop with something like IsPlayerInArea, or PlayerToPos/PlayerToPlayer to see if the player is within range.
Re: How can I turn this into Local OOC? -
kacperoo - 23.05.2009
Use ProxDetector function from godfather. It's quite good
Re: How can I turn this into Local OOC? -
Emanuel_Rodriguez - 21.07.2010
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;
}