mmk - 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: mmk (
/showthread.php?tid=64511)
mmk -
Nimphious - 04.02.2009
pawn Код:
public OnPlayerCommandText(playerid, cmdtext[])
{
if (strcmp("/mycommand", cmdtext, true, 10) == 0)
{
return 1;
}
dcmd(help,4,cmdtext);
return 0;
}
pawn Код:
dcmd_help(playerid,params[]) {
#pragma unused params
if(IsPlayerConnected(playerid) == 0)
{
SendClientMessage(playerid,0x0BF4AEFF,"blablabla");
SendClientMessage(playerid,0x0BF4AEFF,"blablabla");
SendClientMessage(playerid,0x0BF4AEFF,"blablabla");
SendClientMessage(playerid,0x0BF4AEFF,"blablabla");
}
return 1;
}
Now for some reason when I go in-game the commands don't work, any ideas...
Re: mmk -
Dinero - 04.02.2009
You're running FS's on your server codeds on DCMD?
Re: mmk -
Nimphious - 04.02.2009
Quote:
filterscripts adminspec vactions
|
nope.
Re: mmk -
Auto-Sized - 04.02.2009
Quote:
Originally Posted by (FF)TeddyBear
pawn Код:
public OnPlayerCommandText(playerid, cmdtext[]) { if (strcmp("/mycommand", cmdtext, true, 10) == 0) { return 1; } dcmd(help,4,cmdtext);//this is fine. return 0; }
pawn Код:
dcmd_help(playerid,params[]) { #pragma unused params if(IsPlayerConnected(playerid) == 0)//tested with this does not work as I thought it would not. if(IsPlayerConnected(playerid)) this did. { SendClientMessage(playerid,0x0BF4AEFF,"blablabla"); SendClientMessage(playerid,0x0BF4AEFF,"blablabla"); SendClientMessage(playerid,0x0BF4AEFF,"blablabla"); SendClientMessage(playerid,0x0BF4AEFF,"blablabla"); } return 1; }
|
I take it this is a help information command that can be used in player select class?. If you only want them to use in game then.
pawn Код:
if (!IsPlayerConnected(playerid))
Anyway try that it worked for me.
Re: mmk -
Nimphious - 04.02.2009
Nope didn't work
Re: mmk -
Auto-Sized - 04.02.2009
Try it without that line Teddy. Just send the messages. I cannot think what it can be other than don't load any filterscripts then try it and have you got the right dcmd line at the top. If I remember there where two floating around.
Re: mmk -
Nimphious - 04.02.2009
Quote:
Originally Posted by ♦۞pкћп§-шŧųĄ۞♦
Try it without that line Teddy. Just send the messages. I cannot think what it can be other than don't load any filterscripts then try it and have you got the right dcmd line at the top. If I remember there where two floating around.
|
Yea I removed that line and it works now, thnx :P
Re: mmk -
Auto-Sized - 04.02.2009
This might have something to do with the includes thinking about it a_players.inc which is included in a_samp. If you still wanna use that line check you have all the includes.
Re: mmk -
Pixels^ - 04.02.2009
pawn Код:
if(IsPlayerConnected(playerid) == 0)
What your doing there is checking if the player is not connected. This code will never ever execute.
pawn Код:
if(IsPlayerConnected(playerid) == 1)
is the right code.
Re: mmk -
Auto-Sized - 04.02.2009
Now I never used it like that but it makes sense
.