cmd problem
#1

CMDetscore(playerid, params[])
{
new targetid, amount;
if(PlayerInfo[playerid][pAdmin] > 3)
{
if(sscanf(params,"ii", targetid, amount)) return SendClientMessage(playerid, 0xFFFFFFF,"error.Correct usage: /setscore [PlayerID] [Amount]");
else
{
if(PlayerInfo[playerid][pAdmin] < 3) return SendClientMessage(playerid, 0xFFFFFFF,"You need an admin level of 3+ to use this command");
if(!IsPlayerConnected(targetid)) return SendClientMessage(playerid, 0xFFFFFFF,"That player is not connected to the server!");
SetPlayerScore(targetid, amount);
}
}
return 1;
}

it compiles and everything anyone see any problems?
and when i try it ingame it says unknown server command ;o
Reply
#2

pawn Код:
CMD:setscore(playerid, params[])
{
    new targetid, amount;
    if(PlayerInfo[playerid][pAdmin] > 3)
    {
        if(sscanf(params,"ii", targetid, amount)) return SendClientMessage(playerid, 0xFFFFFFF,"error.Correct usage: /setscore [PlayerID] [Amount]");
        if(!IsPlayerConnected(targetid)) return SendClientMessage(playerid, 0xFFFFFFF,"That player is not connected to the server!");
        SetPlayerScore(targetid, amount);
    }
    return 1;
}
Reply
#3

still doesnt work
Reply
#4

Are you an admin with the level three or over?
Reply
#5

Yes but when i try to use it it doesnt even give the message netheir.
Reply
#6

pawn Код:
CMD:setscore(playerid, params[])
{
    new targetid, amount;
    if(PlayerInfo[playerid][pAdmin] >= 3)
    {
        if(sscanf(params,"ud", targetid, amount)) return SendClientMessage(playerid, 0xFFFFFFF,"error.Correct usage: /setscore [PlayerID] [Amount]");
        if(!IsPlayerConnected(targetid)) return SendClientMessage(playerid, 0xFFFFFFF,"That player is not connected to the server!");
        SetPlayerScore(targetid, amount);
    }
    return 1;
}
Reply
#7

still doesnt work =/
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)