Help with this
#1

pawn Код:
CMD:setrpmarks(playerid,params[])
{
new otherid;
new pname[140];
new othername[140];
new inputtext[140];
new rpmarks[10];
GetPlayerName(playerid,pname,sizeof(pname));
GetPlayerName(playerid,othername,sizeof(othername));
if(sscanf(params, "u", otherid, pInfo[playerid][rpmarks])) return SendClientMessage(playerid, White, "USAGE: /setrpmarks [playerid] [marks]");
pInfo[otherid][rpmarks] = rpmarks;
format(string,sizeof(string),"RolePlay Teacher %s has setted your roleplay marks %d",pname,rpmarks);
SendClientMessage(otherid,Yellow,string);
format(string,sizeof(string),"You've setted %s roleplay marks to %d",othername,rpmarks);
SendClientMessage(otherid,Yellow,string);
return 1;
}
When i set it to any digit, it displays that you've setted the player's 17 rpmarks.
even, i set it to 10 or it to any digit
pleaze, fix this problem if you guys can.
i hope, its easy to fix for you guys.
Reply
#2

Someone pleaze help me faster in this.
Reply
#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
#4

still same..
Reply
#5

Quote:
Originally Posted by RyanPetersons
Посмотреть сообщение
still same..
What are the errors!?
Reply
#6

none
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)