Quote:
Originally Posted by Sasoft
Put this on top of your script
pawn Код:
#include <a_samp> #include <zcmd> #include <sscanf2>
You could put this on the bottom of your script.
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; }
|
Here check what you've done wrong
Quote:
Originally Posted by Sasoft
pawn Код:
SetPlayerScore(target, score); // Sets the target to the selected score.
|
Look carefully about your code here you have putted SetPlayerScore function this going to set the score repair your code and use the GivePlayerScore function...