Help with pawno command issues.
#4

Код:
 CMD:do(playerid, params[])
{
    if(isnull(params))
        return SendClientMessage(playerid, COLOR_YELLOW, "SYNTAX: /do [enviornment]");

    new string[128];
    format(string, sizeof(string), "%s (( %s ))", params, GetName(playerid));
    SendNearbyMessage(playerid, COLOR_PURPLE, string);
    return 1;
}
Код:
CMD:b(playerid, params[])
{
    if(isnull(params))
        return SendClientMessage(playerid, COLOR_YELLOW, "SYNTAX: /b [message]");
    if(strlen(params) > 90)
        return SendClientMessage(playerid, COLOR_WHITE, "ERROR: Your message cannot be longer than 90 characters.");

    new string[128];
    format(string, sizeof(string), "(( %s(%d): %s ))", GetName(playerid), playerid, params);
    SendNearbyMessage(playerid, COLOR_PURPLE, string);
    return 1;
}

stock SendNearbyMessage(playerid, color, string[])
{
    new Float:Pos[3];
    GetPlayerPos(playerid, Pos[0], Pos[1], Pos[2]);
    foreach(Player, i)
    {
        if(IsPlayerInRangeOfPoint(i, 20, Pos[0], Pos[1], Pos[2]))
            SendClientMessage(i, color, string);
    }
}
Reply


Messages In This Thread
Help with pawno command issues. - by R3G1ST3R - 12.06.2011, 16:54
Re: Help with pawno command issues. - by Wesley221 - 12.06.2011, 16:56
Re: Help with pawno command issues. - by dud - 12.06.2011, 16:58
Re: Help with pawno command issues. - by R3G1ST3R - 12.06.2011, 17:15

Forum Jump:


Users browsing this thread: 3 Guest(s)