[HELP] SetPlayerScore
#1

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
Reply
#2

Can some one help me ?
Reply
#3

pawn Код:
if (strcmp("/score", cmdtext, true) == 0)
{
     SetPlayerScore(playerid, GetPlayerScore(playerid) +232);
     SendClientMessage(playerid,-1 ,"( ! ) I'm hungry");
     return 1;
}
Reply
#4

Whats the difference ? Another else who can realy help me ?
Reply
#5

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?
Reply
#6

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.
Reply
#7

Oh ok. Sorry.
But your command dont work... I tried to make this command but nothing happens...
Anyway thanks for your help.
Reply
#8

Sloved.
Reply


Forum Jump:


Users browsing this thread: 3 Guest(s)