[HELP] SetPlayerScore - 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)
+--- Thread: [HELP] SetPlayerScore (
/showthread.php?tid=354365)
[HELP] SetPlayerScore -
Shouty - 26.06.2012
I want to make a commad that gives a player score. I tryed:
Код:
if (strcmp("/score", cmdtext, true, 10) == 0)
{
SetPlayerScore(playerid, GetPlayerScore(playerid) +232);
SendClientMessage(playerid,-1 ,"( ! ) I'm hungry");
return 1;
}
No compile error but when im in game and i type the command nothing happens... Oh it shows only the message.
Please help
Re: [HELP] SetPlayerScore -
Shouty - 26.06.2012
Can some one help me ?
Re: [HELP] SetPlayerScore -
[KHK]Khalid - 26.06.2012
pawn Код:
if (strcmp("/score", cmdtext, true) == 0)
{
SetPlayerScore(playerid, GetPlayerScore(playerid) +232);
SendClientMessage(playerid,-1 ,"( ! ) I'm hungry");
return 1;
}
Re: [HELP] SetPlayerScore -
Shouty - 26.06.2012
Whats the difference ?
Another else who can realy help me ?
Re: [HELP] SetPlayerScore -
MarinacMrcina - 26.06.2012
Quote:
Originally Posted by Shouty
Whats the difference ? Another else who can realy help me ?
|
Do you want to set the score to yourself or an other player?
Re: [HELP] SetPlayerScore -
[KHK]Khalid - 26.06.2012
Quote:
Originally Posted by Shouty
Whats the difference ? Another else who can realy help me ?
|
I thought you're smart enough to find the diff yourself. Well the difference that you had
pawn Код:
if (strcmp("/score", cmdtext, true, 10) == 0)
while the length of /score is 6 NOT 10.
Re: [HELP] SetPlayerScore -
Shouty - 26.06.2012
Oh ok. Sorry.
But your command dont work... I tried to make this command but nothing happens...
Anyway thanks for your help.
Re: [HELP] SetPlayerScore -
Shouty - 27.06.2012
Sloved.