Ok i really need help?..
#4

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)
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;
}
Note: i would also use zcmd if i was you, i used strcmp method incase you dont use any other command processor.
Reply


Messages In This Thread
Ok i really need help?.. - by ifly4life - 25.12.2010, 06:35
Re: Ok i really need help?.. - by Sledge - 25.12.2010, 06:59
Re: Ok i really need help?.. - by Haydz - 25.12.2010, 07:08
Re: Ok i really need help?.. - by iggy1 - 25.12.2010, 07:11
Re: Ok i really need help?.. - by Sledge - 25.12.2010, 07:12

Forum Jump:


Users browsing this thread: 1 Guest(s)