Posts: 815
Threads: 127
Joined: May 2011
Reputation:
0
Well, guys I need help on some simple code. Well I created a /shop dialog box with weapons and armor. What I need now, is for players not to abuse the Armor that can be bought from the /shop. At Dialog response, I use SetPlayerArmour but what I need help now is, how do I set it to that the player can only buy Armor once per life, and only after death they can buy again. For example, in 1 life, they can't buy more than once. How do I do that?
All help will be appreciated and rewarded with +REP. Thanks, in advance.
Posts: 1,266
Threads: 6
Joined: Oct 2014
I don't think you can store boolean value inside a char. ;-; [ just did some tests / prints found result wasn't correct. ], may you double check that?
PHP код:
new bool:WhatBro[20 char] = {true, ...};
public OnFilterScriptInit()
{
for(new i = 0; i < 20; i++)
{
printf("%s - %d",(WhatBro{i}) ? ("True") : ("False"), i);
}
}
result:
PHP код:
False - 0
False - 1
False - 2
True - 3
False - 4
False - 5
False - 6
True - 7
False - 8
False - 9
False - 10
True - 11
False - 12
False - 13
False - 14
True - 15
False - 16
False - 17
False - 18
True - 19
Posts: 815
Threads: 127
Joined: May 2011
Reputation:
0
I'll wait. The help is really much appreciated guys. Will REP you once this matter is solved.