Use a variable,this method is not insured in case the player disconnects, else use Y_INI to save them
pawn Code:
new bbooboo[MAX_PLAYERS];
new wbooboo[MAX_PLAYERS];
pawn Code:
if (strcmp("/buybooboo", cmdtext, true, 10) == 0)
{
// your script bla bla
bbooboo[playerid] = 1;//now this will make you know if he bought
return 1;
}
if (strcmp(" /wearbooboo", cmdtext, true, 10) == 0)
{
// your script bla bla
wbooboo[playerid] = 1;//now this will make you know if he wears it.
return 1;
}
Now if you want him to only buy this bla bla once
pawn Code:
if (strcmp("/buybooboo", cmdtext, true, 10) == 0)
{
if(bbooboo[playerid] == 1)return SendClientMessage(playerid,-1,"Dude wtf you already bought one");//he won't be abl to buy an other one unless he uses this one
// your script bla bla
bbooboo[playerid] = 1;//now this will make you know if he bought
return 1;
}
Now when he wears that bla bla He'll have to buy an other one
pawn Code:
if (strcmp(" /wearbooboo", cmdtext, true, 10) == 0)
{
if(bbooboo[playerid] == 0)return SendClientMessage(playerid,-1,"You don't have a bbooboo to wear");//in case he doesn't have a blabla
bbooboo[playerid] = 0;//this will make him lose a bla bla
// your script bla bla
wbooboo[playerid] = 1;//now this will make you know if he wears it.
return 1;
}
If your looking for an other way of using those tell me.