[HELP] silver points
#1

Hello I was add the player silver points to 4 and he type for example /giverespect and for one 1 silver point he get two respects but the problem is know that I made code if player has not 1 point then it says to him you don't have 1 silver point for respect but he have 4 points. Thanks

pawn Код:
if(PlayerInfo[playerid][pSilverPoint] < 1)
                {
                    SendClientMessage(playerid,COLOR_GRAD2,"You don't have one 1 silver point for respect");
                    return 1;
                }
Reply
#2

I don't understand you but i think you have to make this
PHP код:
if(PlayerInfo[playerid][pSilverPoint] == 0)
                {
                    
SendClientMessage(playerid,COLOR_GRAD2,"You don't have one 1 silver point for respect");
                    return 
1;
                } 
If the player info equal Zero (less than one ! ).
Reply
#3

it doesn't help I have 13 silver points but for removing warn from stats need 20 points and when I was type /removewarn I was remove but I shouldn't beacuse I only have 13 silver points
Reply
#4

Can you show us the command for /removewarn.
Reply
#5

Код:
CMD:removewarning(playerid, params[])
{
	if(PlayerInfo[playerid][pSilverPoint] < 20) return SendClientMessage(playerid, -1, "You don't have 20 Silver Points to remove the warning.");

	PlayerInfo[playerid][pSilverPoint] -= 20; // Take 20 points off the player
	PlayerInfo[playerid][pWarn]--; // Remove 1 warning (Depends on your pinfo data).
	SendClientMessage(playerid, -1, "You spent 20 silver points and removed a warning!");
	return 1;
}
Depends on what command system you use i used ZCMD here.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)