/pm system how?
#2

This should work how you want it to.

pawn Код:
CMD:pm( playerid, params[ ] )
{
    new iTarget, szMsg[ 100 ];

    if ( sscanf( params, "rs[100]", iTarget, szMsg ) )
    {
        return SendClientMessage( playerid, 0xFF3333AA, "[USAGE]: /pm ( id) ( message )" );
    }

    if ( iTarget == INVALID_PLAYER_ID )
    {
        return SendClientMessage( playerid, 0xFF3333AA, "[ERROR]: That player is not connected!" );
    }

    new szStr[ 128 ];
    new pName[ MAX_PLAYER_NAME ], tName[ MAX_PLAYER_NAME ];
    GetPlayerName( playerid, pName, MAX_PLAYER_NAME );
    GetPlayerName( iTarget, tName, MAX_PLAYER_NAME );
    format( szStr, sizeof ( szStr ), "[PM] %s [ID:%i]: %s", pName, playerid, szMsg );
    SendClientMessage( iTarget, 0x33FF33AA, szStr );
    format( szStr, sizeof ( szStr ), "[PM] Sent to %s [ID:%i]: %s", tName, iTarget, szMsg );
    SendClientMessage( playerid, 0x33FF33AA, szStr );
    return true;
}
Reply


Messages In This Thread
/pm system how? - by NewLifeRoleplay - 20.06.2013, 21:42
Re: /pm system how? - by JJB562 - 20.06.2013, 21:50

Forum Jump:


Users browsing this thread: 1 Guest(s)