01.01.2017, 14:51
Hello, everyone! I want to make a command. /onduty and /offduty for cops. I want like:
I did /offduty
I got the message: You're now an off-duty cop.
Everyone got: Wrench(ID.) is now an off-duty cop.
etc.
I did this:
I am sure that it is wrong. How can I do this? Please help me guys.
I did /offduty
I got the message: You're now an off-duty cop.
Everyone got: Wrench(ID.) is now an off-duty cop.
etc.
I did this:
Код:
public OnPlayerCommandText(playerid, cmdtext[]) { if (strcmp("/offduty", cmdtext, true, 5) == 0) { SendClientMessage(playerid,0xFFFFFF,"You're now an off-duty cop."); format(fstr, sizeof(fstr), "%s [%d] is now an off-duty cop.", GetName(playerid), playerid, GetName(targetid), targetid, reason); } return 0; } public OnPlayerCommandText(playerid, cmdtext[]) { if (strcmp("/onduty", cmdtext, true, 5) == 0) { SendClientMessage(playerid,0xFFFFFF,"You're now an on-duty cop."); format(fstr, sizeof(fstr), "%s [%d] is now an on-duty cop.", GetName(playerid), playerid, GetName(targetid), targetid, reason); } return 0; }