[HELP] OOC problem... - 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: [HELP] OOC problem... (
/showthread.php?tid=82675)
[HELP] OOC problem... -
FreddeN - 19.06.2009
I have a OOC cmd that looks like "/o", I also have /l.
When I'm using /l, it appears on /o ingame...
It also happens on all my other cmds like /me and /do etc
The cmd's is.
OOC:
Код:
if(strcmp(cmd,"/o",true) == 0)
{
new name1[256];
GetPlayerName(playerid,name1,sizeof(name1));
if ((strlen(cmdtext) >= 1)&&(strlen(cmdtext) <= 3))
{
SendClientMessage(playerid,COLOR_WHITE, "USAGE: /o [text]"); return 1;
}
format(string,sizeof(string),"(( OOC: %s: %s ))",name1,cmdtext[3]);
SendClientMessageToAll(COLOR_WHITE,string);
return 1;
}
Local OOC:
Код:
if(strcmp(cmd, "/l", true) == 0)
{
if(IsPlayerConnected(playerid))
{
GetPlayerName(playerid, sendername, sizeof(sendername));
new length = strlen(cmdtext);
while ((idx < length) && (cmdtext[idx] <= ' '))
{
idx++;
}
new offset = idx;
new result[64];
while ((idx < length) && ((idx - offset) < (sizeof(result) - 1)))
{
result[idx - offset] = cmdtext[idx];
idx++;
}
result[idx - offset] = EOS;
if(!strlen(result))
{
SendClientMessage(playerid, COLOR_WHITE, "USAGE: /l [text]");
return 1;
}
format(string, sizeof(string), "(( Local OOC: %s: %s ))", sendername, result);
ProxDetector(20.0, playerid, string,COLOR_WHITE,COLOR_WHITE,COLOR_WHITE,COLOR_WHITE,COLOR_WHITE);
printf("%s", string);
}
return 1;
}
I have added the Pawno functions, ProxDetector.
Thanks for your help