SA-MP Forums Archive
huge problen - 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: huge problen (/showthread.php?tid=91588)



huge problen - nuriel8833 - 15.08.2009

I have 2 problems with CMD spec code that i made

1.where to put that?
pawn Код:
format(astring,sizeof(astring)," [Cmd Spec] %s (ID: %d) did the command: %s", name, playerid, cmdtext);
        SendClientMessageToAdmins(COLOR_GREEN, astring, 6);
2.how do define the CmdSpec,like this?:
pawn Код:
new CmdSpec[MAX_PLAYERS];
please help me



Re: huge problen - RyDeR` - 15.08.2009

1. OnPlayerText.

2. I think you mean new CmdSpec[MAX_PLAYERS] = 1; // or 0 || And use if(CmdSpec[playerid] == 1) return SendClientMessage(playerid, COLOR, "You're already spectating");


Re: huge problen - RyDeR` - 15.08.2009

Ow sory, I understood 2 wrong..


Re: huge problen - nuriel8833 - 16.08.2009

Quote:
Originally Posted by [WsR
RyDeR ]
1. OnPlayerText.

2. I think you mean new CmdSpec[MAX_PLAYERS] = 1; // or 0 || And use if(CmdSpec[playerid] == 1) return SendClientMessage(playerid, COLOR, "You're already spectating");
yea thats how im using it with 1 and 0
so how to change that


Re: huge problen - nuriel8833 - 16.08.2009

So where to put that?



Re: huge problen - CJ101 - 16.08.2009

Quote:
Originally Posted by [WsR
RyDeR ]
1. OnPlayerText.



Re: huge problen - nuriel8833 - 16.08.2009

Quote:
Originally Posted by cj101
Quote:
Originally Posted by [WsR
RyDeR ]
1. OnPlayerText.
he said 2 wrong.. O___o


Re: huge problen - RyDeR` - 16.08.2009

Hmm, can you explain what you want to do with CmdSpec[MAX_PLAYERS]; I don't understand it that good.


Re: huge problen - nuriel8833 - 16.08.2009

If it CmdSpec = 1 you can see all the cmd
if it CmdSpec = 0 you cant see all the cmd


Re: huge problen - RyDeR` - 16.08.2009

Quote:
Originally Posted by nuriel8833
If it CmdSpec = 1 you can see all the cmd
if it CmdSpec = 0 you cant see all the cmd
Add in your script above, #define CMDSPEC
Then go to OnPlayerText use
#if defined CMDSPEC
format(astring,sizeof(astring)," [Cmd Spec] %s (ID: %d) did the command: %s", name, playerid, cmdtext);
SendClientMessageToAdmins(COLOR_GREEN, astring, 6);
#endif

You can use // on #define CMDSPEC to disable it. When it's on (whitout //) you can see it.