[QUESTION] What's Wrong With This Command?
#5

Quote:
Originally Posted by Kindred
Посмотреть сообщение
pawn Код:
CMD:pow(playerid,params[])
{
    if(IsACop(playerid))
    return cmd_m(playerid, "======YOU SEE FLASHING LIGHTS AND SIRENS======");
    return 1;
}
You forgot to return a value if the player WASN'T a cop.
Thanks Very Much That Worked. I Was wondering If You Could Help Me With Something Else, Do You Know Why This Command Sends a Message To The Whole Server If No ID Is Entered?

pawn Код:
CMD:rights(playerid, params[])
{
    new id = strval(params);
    if(IsACop(playerid))
    if(!IsPlayerConnected(id))SendClientMessage(playerid, 0xFF0000FF, "Invalid Player ID");
    else
    {
        SendClientMessage(id, COLOR_RED, "You Have The Right To Remain Silent.");
        SendClientMessage(id, COLOR_RED, "Anything You Say Can Be Used Against You In a Court Of Law.");
        SendClientMessage(id, COLOR_RED, "You Have The Right To An Attorney Present Now And During Any Further Questioning");
        SendClientMessage(id, COLOR_RED, "If You Can Not Afford An Attorney, One Will Be Appointed To You Free Of Charge If You Wish");
        SendClientMessage(id, COLOR_RED, "Do You Understand Your Rights As They Have Been Read To You?((Say Yes Or No To The Officer))");
    }
    return 1; // Always need to return 1 on commands, or you'll see "SERVER: Unknown Command".
}
Reply


Messages In This Thread
[QUESTION] What's Wrong With This Command? - by Anters14 - 20.07.2012, 17:43
Re: [QUESTION] What's Wrong With This Command? - by Rudy_ - 20.07.2012, 17:45
Re: [QUESTION] What's Wrong With This Command? - by Anters14 - 20.07.2012, 17:47
Re: [QUESTION] What's Wrong With This Command? - by Kindred - 20.07.2012, 17:47
Re: [QUESTION] What's Wrong With This Command? - by Anters14 - 20.07.2012, 17:56

Forum Jump:


Users browsing this thread: 3 Guest(s)