06.06.2010, 13:18
Hello, i'm making a drugs system but i have a problem.
I the player uses '/usedrug weed' he uses it but i can't
do -1 weed, it stay 10 weed when i use. What's the problem?
I the player uses '/usedrug weed' he uses it but i can't
do -1 weed, it stay 10 weed when i use. What's the problem?
Quote:
if (strcmp("/usedrug weed", cmdtext, true, 10) == 0) { new pWeed = Weed[playerid]; new pStoned = PlayerStoned[playerid]; new string4[256]; new string6[256]; if(pWeed < 1) { SendClientMessage(playerid, COLOR_RED, "[P-RP]: You don't have any weed on you."); return 0; } if(pWeed > 1) { pWeed -=1; pStoned = 1; format(string4, sizeof(string4), "[P-RP]: You smoke some weed.", pWeed); format(string6, sizeof(string6), "[P-RP]: Condition : Stoned", pStoned); SendClientMessage(playerid, COLOR_GREEN, string4); SendClientMessage(playerid, COLOR_GREEN, string6); return 1; } } |