Need Help for some scripts....
#2

pawn Код:
stock getpName( playerid )
{
    new pName[ 24 ];
    GetPlayerName( playerid, pName, sizeof pName );
    return pName;
}

// PM Command ( ZCMD + SSCANF )

CMD:pm( playerid, params[ ] )
{
    new targetid, msg[ 128 ];

    if ( sscanf( params, "us[128]", targetid, msg ) )
        return SendClientMessage( playerid, 0xFFFFFFAA, "Correct Usage: /PM < Playerid/PartOfName > < MSG >." );

    if ( !IsPlayerConnected( targetid ) )
        return SendClientMessage( playerid, 0xFFFFFFAA, "Invalid player." );

    if ( targetid == playerid )
        return SendClientMessage( playerid, 0xFFFFFFAA, "You cannot PM yourself." );

    new szstring[ 128 ];

    format( szstring, sizeof szstring, ">>PM Sent to %s ( %d ) : %s.",  getpName( targetid ), targetid, msg );

    SendClientMessage( playerid, 0x00FF00AA, szstring );

    format( szstring, sizeof szstring, ">>PM from %s( %d ) : %s.", getpName( playerid ), playerid, msg );

    SendClientMessage( playerid, 0x00FF00AA, szstring );

    return 1;
}

// Carcolor command ( ZCMD + SSCANF )

CMD:cc( playerid, params[ ] )
{
    new color1, color2;

    if ( !IsPlayerInAnyVehicle( playerid ) )
        return SendClientMessage( playerid, 0xFFFFFFAA, "You are not in any vehicles." );

    if ( sscanf( params, "ii", color1, color2 ) )
        return SendClientMessage( playerid, 0xFFFFFFAA, "/cc < color1 > < color2 >" );

    ChangeVehicleColour( GetPlayerVehicleID( playerid ), color1, color2 );

    return 1;
}
EDIT: Here is the /s and /g script! http://basicz.pastebay.com/126242 ( pastebay fucked up the indentation )
Reply


Messages In This Thread
Need Help for some scripts.... - by [TDR]GiOrGoS[EX] - 16.06.2011, 13:44
Re: Need Help for some scripts.... - by Basicz - 16.06.2011, 14:27
Re: Need Help for some scripts.... - by [TDR]GiOrGoS[EX] - 16.06.2011, 15:40
Re: Need Help for some scripts.... - by [TDR]GiOrGoS[EX] - 16.06.2011, 15:54
Re: Need Help for some scripts.... - by alpha500delta - 16.06.2011, 17:09
Re: Need Help for some scripts.... - by [TDR]GiOrGoS[EX] - 17.06.2011, 06:38
Re: Need Help for some scripts.... - by Max_Coldheart - 17.06.2011, 06:43
Re: Need Help for some scripts.... - by [TDR]GiOrGoS[EX] - 17.06.2011, 08:52
Re: Need Help for some scripts.... - by [TDR]GiOrGoS[EX] - 17.06.2011, 09:06
Re: Need Help for some scripts.... - by [TDR]GiOrGoS[EX] - 18.06.2011, 19:58

Forum Jump:


Users browsing this thread: 3 Guest(s)