15.05.2013, 02:16
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;
}
}
ok guys i just started to script 1 day ago so i am very new at this and i am having trouble why is telling me to return a value to CMD "setscore" ?? can u help me fix this one error please i would greatly appreciate it .
error : "cmd_setscore" should return a value
{
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;
}
}
ok guys i just started to script 1 day ago so i am very new at this and i am having trouble why is telling me to return a value to CMD "setscore" ?? can u help me fix this one error please i would greatly appreciate it .
error : "cmd_setscore" should return a value