26.09.2012, 18:11
Put this on top of your script
You could put this on the bottom of your script.
pawn Код:
#include <a_samp>
#include <zcmd>
#include <sscanf2>
pawn Код:
COMMAND:givescore(playerid, params[]){
new target, score; // Defining the target and the score you want to give
if(sscanf(params, "ud", target, params)){ // Checks if you typed everything in the right order. ( Target first and the amount of score you wish to give)
SendClientMessage(playerid, 0xFFFFFFFF, "/givescore [target] [score]"); // Sends this message if you didn't typ it in the right order.
return 1; // returns so the command doesen't execute when you type in the wrong order.
}
SetPlayerScore(target, score); // Sets the target to the selected score.
return 1;
}