Have any tools can let me transform normal command to YCMD? - 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)
+--- Thread: Have any tools can let me transform normal command to YCMD? (
/showthread.php?tid=403089)
Have any tools can let me transform normal command to YCMD? -
yxliang - 29.12.2012
Have any tools can let me transform normal command to YCMD?
And how to set player permission that can prevent player using any command by using YCMD?
Thank you!
Re: Have any tools can let me transform normal command to YCMD? -
Ballu Miaa - 29.12.2012
What command do you want to change? And what kind of permissions do you want set?
Setting permission is done the same way everywhere. All you need to do is just change the syntax of the command to YCMDs syntax of commands. Paste your command here and tell us what do you want us to do with it.
Re: Have any tools can let me transform normal command to YCMD? -
yxliang - 29.12.2012
Quote:
Originally Posted by Ballu Miaa
What command do you want to change? And what kind of permissions do you want set?
Setting permission is done the same way everywhere. All you need to do is just change the syntax of the command to YCMDs syntax of commands. Paste your command here and tell us what do you want us to do with it.
|
like
Код:
public OnPlayerCommandText(playerid, cmdtext[])
{
if(strcmp(cmd, "/acar", true) == 0)
{
if(IsPlayerAdmin(playerid))
{
//SomeThing...
}
return 1;
}
}
return 0;
}
This is the command form that I want to transform to YCMD. And I don't want any admin command using the code IsPlayerAdmin(playerid), I heard YCMD have better permissions control than like this.
Re: Have any tools can let me transform normal command to YCMD? -
Ballu Miaa - 29.12.2012
pawn Код:
YCMD:acar(playerid, params[], help)
{
if (help)
{
SendClientMessage(playerid, 0xFF0000AA, "Lets you get an Admin Car.");
}
else
{
if(IsPlayerAdmin(playerid)) // Your code over here afterwards.
}
return 1;
}
Re: Have any tools can let me transform normal command to YCMD? -
yxliang - 29.12.2012
Quote:
Originally Posted by Ballu Miaa
pawn Код:
YCMD:acar(playerid, params[], help) { if (help) { SendClientMessage(playerid, 0xFF0000AA, "Lets you get an Admin Car."); } else { if(IsPlayerAdmin(playerid)) // Your code over here afterwards. } return 1; }
|
I know how to transform command, I just want to know have any tool can auto transform to YCMD because my map have a lot of command(about 2000).And I don't want to use IsPlayerAdmin(playerid) at all.