25.12.2010, 07:11
I wrote something simple as a cristmas present i hope it works for you. (i never did all codes just a couple as an example)
Note: i would also use zcmd if i was you, i used strcmp method incase you dont use any other command processor.
pawn Код:
#include <a_samp>
new PoliceCodes[][] =//you would put this near the top of your code
{ //with other global variables.
{"10-1 Unable to copy -- change location"},{"10-2 Signal good"},{"10-3 Stop transmitting"},
{"10-4 Acknowledgement (OK)"},{"10-5 Relay"},{"10-6 Busy -- stand by unless urgent"}
//rest of codes here
//...
};
public OnPlayerCommandText(playerid, cmdtext[])
{
if (strcmp("/policecodes", cmdtext, true, 10) == 0)
{
for(new i; i < sizeof(PoliceCodes); i++)
{
SendClientMessage(i, 0xff0000FF, PoliceCodes[i]);
}
return 1;
}
return 0;
}