Bugged Id's
#1

Does anyone know when i use /makeadmin or /makevip and i chose a ID it just repeats the command, example:
/makeadmin 0 99999 <--- First Time
/makeadmin [Player] [Rank] It just repeats that.
Anyone know whats wrong? It's something to do with the Player Id's.
Reply
#2

your script keeps sending the commands usage to the playerid who typed it? its obviously inside a loop. show us your command.
Reply
#3

Its not just that command, its for all commands that include a number like /setskin ect they are all looping and i dont know the problem, it only happens to Id's below [10 I THINK, Not Sure]
Reply
#4

If you would show us your code, we would help you, without a code, nothing can be say.
Reply
#5

Well, I dont know what part of the script it is, it could be the whole thing, I dont know were abouts to show you :/
Reply
#6

Post your makeadmin and makevip command.
Reply
#7

show the command?
Reply
#8

Quote:

CMD:makeadmin(playerid, params[]) {
if(PlayerInfo[playerid][pAdmin] >= 133 {

new
iAdminValue,
iTargetID;

if(sscanf(params, "ui", iTargetID, iAdminValue)) {
SendClientMessageEx(playerid, COLOR_WHITE, "USAGE: /makeadmin [playerid] [level]");
}
else if(IsPlayerConnected(iTargetID)) {
if(PlayerInfo[iTargetID][pHelper] >= 1) {
SendClientMessageEx(playerid, COLOR_GRAD1, "You cannot make community advisors admins!");
}
else {

new
szMessage[47 + (MAX_PLAYER_NAME * 2)];

PlayerInfo[iTargetID][pAdmin] = iAdminValue;
format(szMessage, sizeof(szMessage), "AdmCmd: %s has promoted %s to a level %d admin.", GetPlayerNameEx(playerid), GetPlayerNameEx(iTargetID), iAdminValue);
ABroadCast(COLOR_LIGHTRED,szMessage, 2);
format(szMessage, sizeof(szMessage), "You have been promoted to a level %d admin by %s.", iAdminValue, GetPlayerNameEx(playerid));
SendClientMessageEx(iTargetID, COLOR_LIGHTBLUE, szMessage);
format(szMessage, sizeof(szMessage), "You have promoted %s to a level %d admin.", GetPlayerNameEx(iTargetID),iAdminValue);
SendClientMessageEx(playerid, COLOR_LIGHTBLUE, szMessage);
}
}
else SendClientMessageEx(playerid, COLOR_GRAD2, "Invalid player specified.");
}
else SendClientMessageEx(playerid, COLOR_GRAD1, "You are not authorized to use that command!");
return 1;
}

There is the admin code.
Reply
#9

Try this code;
pawn Код:
CMD:makeadmin( playerid, params[] )
{
    new
        iAdminValue,
        iTargetID,
        szMessage[ 128 ]
    ;

    if( sscanf( params, "ui", iTargetID, iAdminValue ) )
        return SendClientMessage( playerid, COLOR_WHITE, "USAGE: /makeadmin [playerid] [level]" );

    if( PlayerInfo[ playerid ][ pAdmin ] != 1338 )
        return SendClientMessage( playerid, COLOR_GRAD1, "You are not authorized to use that command!" );

    if( !IsPlayerConnected( iTargetID ) )
        return SendClientMessage( playerid, COLOR_GRAD2, "Invalid player specified." );
   
    if( PlayerInfo[ iTargetID ][ pHelper ] >= 1 )
        return SendClientMessage( playerid, COLOR_GRAD1, "You cannot make community advisors admins!" );

    PlayerInfo[ iTargetID ][ pAdmin ] = iAdminValue;
   
    format( szMessage, 128, "AdmCmd: %s has promoted %s to a level %d admin.", GetPlayerNameEx( playerid ), GetPlayerNameEx( iTargetID ), iAdminValue );
    ABroadCast( COLOR_LIGHTRED, szMessage, 2 );

    format( szMessage, 128, "You have been promoted to a level %d admin by %s.", iAdminValue, GetPlayerNameEx( playerid ) );
    SendClientMessage( iTargetID, COLOR_LIGHTBLUE, szMessage );

    format( szMessage, 128, "You have promoted %s to a level %d admin.", GetPlayerNameEx( iTargetID ), iAdminValue );
    SendClientMessage(playerid, COLOR_LIGHTBLUE, szMessage );

    return 1;
}
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)