SA-MP Forums Archive
cmd problem - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: cmd problem (/showthread.php?tid=437478)



cmd problem - Marcus181 - 15.05.2013

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


Re: cmd problem - tyler12 - 15.05.2013

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;
}



Re: cmd problem - Marcus181 - 15.05.2013

still doesnt work


Re: cmd problem - tyler12 - 15.05.2013

Are you an admin with the level three or over?


Re: cmd problem - Marcus181 - 15.05.2013

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


Re : cmd problem - DaTa[X] - 15.05.2013

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;
}



Re: cmd problem - Marcus181 - 15.05.2013

still doesnt work =/