29.04.2012, 08:40
Of course it said unknown command because you didn't add
to your OnPlayerCommandText.
This is necessary when using DCMD.
Click me for more info!
Also:
PS: What CrazyMax and Romel posted is SETallscore, not GIVEallscore.
pawn Код:
dcmd(giveallscore, 12, cmdtext);
This is necessary when using DCMD.
Click me for more info!
Also:
pawn Код:
dcmd_giveallscore(playerid,params[]) {
if(AccInfo[playerid][Level] >= 3) {
SendCommandToAdmins(playerid,"GiveAllScore");
for(new i = 0; i < MAX_PLAYERS; i++) {
SetPlayerScore(i, GetPlayerScore(i) + strval(params));
}
new string[128];
format(string,sizeof string,"|- Administrator \"%s\" has given everyone %d score!", pName(playerid), strval(params));
SendClientMessageToAll(blue, string);
}
else {
ErrorMessages(playerid, 6);
}
return 1;
}