01.06.2009, 09:01
Код:
//Drugs::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: if (strcmp("/buydrugs", cmdtext, true) == 0) { if(PlayerToPoint(2, playerid, 1253.7599,-1835.2896,13.3896)) { SendClientMessage(playerid, 0xFFFF00A, "You have bought some drugs"); } else { SendClientMessage(playerid, 0xFF000AA, "You are not at the drugs market"); } return 1; } //use drugs if (strcmp("/usedrugs", cmdtext, true) == 0) { holdingDrugs[playerid] += 1; // or any other vaue. you can use strtok to set it then it would be... holdingDrugs[playerid] += tmp; or something like it. if(holdingDrugs[playerid] > 0) { SendClientMessage(playerid, 0xFFFF00A, "You have Used 1 Gram of drugs"); } else { SendClientMessage(playerid, 0xFF000AA, "You have no drugs to use"); } return 1; }