Help with this
#3

pawn Код:
CMD:setrpmarks( playerid,params[ ] )
{
    new targetid, rpmarks, szName[ 24 ], szOtherName[ 24 ], szStr[ 128 ];
   
    GetPlayerName( playerid,szName,sizeof( szName ) );
   
    if( sscanf( params, "ud", targetid, rpmarks ) ) return SendClientMessage( playerid, White, "USAGE: /setrpmarks [playerid] [marks]" );

    GetPlayerName( targetid, szOtherName, sizeof( szOtherName ) );
   
    pInfo[ targetid ][ rpmarks ] = rpmarks;
   
    format( szStr, sizeof( szStr ), "RolePlay Teacher %s has setted your roleplay marks %d", szName, rpmarks );
    SendClientMessage( targetid, Yellow, szStr );
   
    format( szStr, sizeof( szStr ), "You've setted %s roleplay marks to %d", szOtherName, rpmarks );
    SendClientMessage( playerid, Yellow, szStr );
    return 1;
}
This is what I re-wrote as your code was totally wrong and it was bugged And next to that, don't use "140" because if the arrays become higher and they are not used it will probably make your server lag (afaik) and to let you know the max player name in the server is not more then "24".

Hope this helps.
Reply


Messages In This Thread
Help with this - by RyanPetersons - 04.09.2012, 12:31
Re: Help with this - by RyanPetersons - 04.09.2012, 12:53
Re: Help with this - by FalconX - 04.09.2012, 12:57
Re: Help with this - by RyanPetersons - 04.09.2012, 13:02
Re: Help with this - by FalconX - 04.09.2012, 13:03
Re: Help with this - by RyanPetersons - 04.09.2012, 13:05

Forum Jump:


Users browsing this thread: 2 Guest(s)