How do I fix this?
#1

Hi I have made all my police 10 codes but when you type the code in, in-game it doesn't say who said it because I havn't added it but I don't know what to put.
Here is a small example of what I have done so far.

pawn Код:
public OnPlayerText(playerid, text[])
{
    if(!strcmp(text, "10-0", true))
    {
        SendClientMessageToAll(0xFF0000FF, "CAUTION");
        return 0;
    }
    if(!strcmp(text, "10-1", true))
    {
        SendClientMessageToAll(0xFF0000FF, "Signal Weak");
        return 0;
    }
Reply
#2

pawn Код:
public OnPlayerText(playerid, text[])
        {
            new Name[MAX_PLAYER_NAME];
            GetPlayerName(playerid, Name, sizeof(Name));
            new string[128];
            if(!strcmp(text, "10-0", true))
            {
                format(string, sizeof(string), "Be Cautiom %s ", Name );
                SendClientMessageToAll(0xFF0000FF, string);
                return 0;
            }
            if(!strcmp(text, "10-1", true))
            {
                format(string, sizeof(string), "Single Weak %s ", Name );
                SendClientMessageToAll(0xFF0000FF, string);
                return 0;
            }
        }
Reply
#3

Ok I put that code in but I get this warning
Код:
warning 217: loose indentation
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)