Quantcast
Channel: SA-MP Forums
Viewing all articles
Browse latest Browse all 18226

SendClientMessage ingame error

$
0
0
So i made a setscore command:
Code:

CMD:setscore(playerid, params[])
{
        new targetid, score, name[24], texttotarget[20], textadmin[20];
        if(Player[playerid][Admin] < 4) return SendClientMessage(playerid, COLOR_RED, "[WARNING] You are not authorized to use this command!");
        if(sscanf(params, "ui", targetid, score)) return SendClientMessage(playerid, COLOR_RED, "SYNTAX: /setscore <ID> <Score>");
        GetPlayerName(targetid, name, 24);
        SetPlayerScore(targetid, GetPlayerScore(targetid) + score);
        format(texttotarget, sizeof(texttotarget),"[ADMIN] %s has set your score to: %i", playerid, score);
        format(textadmin, sizeof(textadmin),"[ADMIN] You have set the score of %s to: %i", targetid, score);
        SendClientMessage(targetid, COLOR_GREEN, texttotarget);
        SendClientMessage(playerid, COLOR_GREEN, textadmin);
        return 1;
}

But when I use the command ingame (i do get the score), But the text is bugged.
What it says: [ADMIN] has set yo. And [ADMIN] You have se.

Viewing all articles
Browse latest Browse all 18226

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>