Script help
#4

pawn Код:
CMD:pchat (playerid, params [])
{
    new msg[128], name[MAX_PLAYER_NAME];
    GetPlayerName(playerid, name, sizeof(name));
    if(IsPlayerInAnyVehicle(playerid) && GetPlayerVehicleID(playerid) == 417 || 425 || 447 || 460 || 469 || 476 || 487 ||488 || 489 || 511 || 512 || 513 ||519 || 520 || 548 || 553 || 563 || 577 || 592 || 593)
    {
        if (isnull (params)) return SendClientMessage(playerid, -1, "Usage: /pchat [msg]");
        else
        {
             for(new i = 0; i<MAX_PLAYERS; i++)
            {
                 if( GetPlayerVehicleID(i) == 417 || 425 || 447 || 460 || 469 || 476 || 487 ||488 || 489 || 511 || 512 || 513 ||519 || 520 || 548 || 553 || 563 || 577 || 592 || 593)
                {
                    format(msg, sizeof(msg), "Pilot %s : %s", name, params)
                    SendClientMessage(i, -1, msg);
                }
            }
        }
    }
    else {SendClientMessage(playerid, -1 , "You Need to be in a air vehicle to use Pilot's chat"); }
    return 1;
}
i prefer u to add #pragma tabsize 0 on top of the script and below includes to prevent loose indention warning.
Im using ZCMD here.
Add this script anywhere and not inside any callback and place the script below main()
Reply


Messages In This Thread
Script help - by huydollar - 14.11.2013, 13:41
Re: Script help - by Sands - 14.11.2013, 13:42
Re: Script help - by huydollar - 14.11.2013, 13:56
Re: Script help - by newbie scripter - 14.11.2013, 14:09
Re: Script help - by Elie1996 - 14.11.2013, 14:32
Re: Script help - by newbie scripter - 14.11.2013, 15:11
Re: Script help - by huydollar - 15.11.2013, 23:53

Forum Jump:


Users browsing this thread: 4 Guest(s)