SA-MP Forums Archive
how to make a new cmd - 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 to make a new cmd (/showthread.php?tid=160256)



how to make a new cmd - Abraham2nd - 16.07.2010

Ok I wanted to know how to make a new cmd that only DJ sees when others type it , its for my radio on Teamspeak.
like /request - to request a song
/request [song name] [artist]
and only the admins see


Re: how to make a new cmd - Lorenc_ - 16.07.2010

Maybe use a report command and change its config?


Re: how to make a new cmd - Abraham2nd - 16.07.2010

Quote:
Originally Posted by Lorenc_
Посмотреть сообщение
Maybe use a report command and change its config?
hmm good how about this:
if(strcmp(cmd, "/request", true) == 0 || strcmp(cmd, "/req", true) == 0)
{
if(IsPlayerConnected(playerid))
{
if(JustReported[playerid] == 1)
{
SendClientMessage(playerid, COLOR_GREY, "** Wait 1 minute after sending a next request! ");
return 1;
}
tmp = strtok(cmdtext, idx);
if(!strlen(tmp))
{
SendClientMessage(playerid, COLOR_GRAD2, "USAGE: (/req)uest[song name] [Artist]");
return 1;
}