Give 1 Score Code(s)
#1

Is it possible to make a code that gives the player +1 score or maybe -1 if he/she do a command?
If yes what would the code(s) be.
Would be nice with help, I got savescore on my server but nothing the players can earn score from
Reply
#2

pawn Код:
public OnPlayerCommandText(playerid, cmdtext[])
{
    if(!strcmp(cmdtext, "/scoreup", true))
    {
        SendClientMessage(playerid, 0xFFFFFFFF, "SERVER: You typed /scoreup and earned +1 score!"); // Send message to player
        SetPlayerScore(playerid,(GetPlayerScore(playerid))+1); // Set player score up for 1
        return 1;
    }
    return 0;
}
Reply
#3

Код:
public OnPlayerDeath(playerid, killerid, reason)
{
SetPlayerScore(killerid,GetPlayerScore(killerid)+1);
return 1;
}
Reply
#4

Thanks, Ill try it out.
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)