How To Make a Command Do Another Command
#1

Can Someone Help Me Make a Command For Police, I Want To Make It So ONly PD Can Do It.

They Will Type /po And It Well Send The /m Command Saying "MDPD Pull Over To The RIGHT Side Of The Road". I Don't Know How To Do This, Any Help Would Be Appreciated, Thanks!

Thanks Anthony
Reply
#2

What game mode are you using?
Reply
#3

pawn Код:
CMD:po(playerid,params[])
{
   if(gteam[playerid] == class variable)
  {

    SendClientMessage(playerid,putcolorhere,"MDPD Pull Over To The Right Side Of The Road");
     }
   else
   {
   
   SendClientMessage(playerid,-1,"You are not MDPD to use this command!");

   }
return 1;
}
Reply
#4

pawn Код:
CMD:po2(playerid,params[])
    return cmd_po(playerid, params);
EDIT: Sorry i replied to the thread name and not the first post, i think the code i posted is irrelevant.
Reply
#5

Quote:
Originally Posted by iggy1
Посмотреть сообщение
pawn Код:
CMD:po2(playerid,params[])
    return cmd_po(playerid, params);
EDIT: Sorry i replied to the thread name and not the first post, i think the code i posted is irrelevant.
Or that..
Reply
#6

pawn Код:
CMD:po(playerid,params[])
{
    return cmd_m(playerid, "MDPD Pull Over To The RIGHT Side Of The Road");
}
or

pawn Код:
CMD:po(playerid,params[])
{
    return OnPlayerCommandText(playerid, "/m MDPD Pull Over To The RIGHT Side Of The Road");
}
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)