Give 1 Score Code(s) - Printable Version
+- SA-MP Forums Archive (
https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (
https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (
https://sampforum.blast.hk/forumdisplay.php?fid=12)
+---- Forum: Help Archive (
https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: Give 1 Score Code(s) (
/showthread.php?tid=263785)
Give 1 Score Code(s) -
OleKristian95 - 23.06.2011
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
Re: Give 1 Score Code(s) -
int3s0 - 23.06.2011
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;
}
Re: Give 1 Score Code(s) -
Remba031 - 23.06.2011
Код:
public OnPlayerDeath(playerid, killerid, reason)
{
SetPlayerScore(killerid,GetPlayerScore(killerid)+1);
return 1;
}
Re: Give 1 Score Code(s) -
OleKristian95 - 23.06.2011
Thanks, Ill try it out.