Quote:
|
Originally Posted by Jordan69
Quote:
|
Originally Posted by ilikepie2221
Use SetTimerEx when they sell drugs, and make a variable to save the seconds that have passed. For example:
pawn Код:
new drugstimer[MAX_PLAYERS]; drugtimer;
forward SellDrugTimer(playerid);
public OnPlayerCommandText(playerid, cmdtext[]) { if(strcmp("/selldrugs",cmdtext,true) == 0) { if(drugstimer[playerid] == 0) { // Code to sell the drug drugtimer = SetTimerEx("SellDrugTimer",1000,true,playerd); return 1; } if(drugstimer[playerid] >= 1) { SendClientMessage(Well, yeah); return 1; } } return 0; }
public SellDrugTimer(playerid) { if(drugstimer[playerid] => 1) drugstimer[playerid] -= 1; if(drugstimer[playerid] == 1) KillTimer(drugtimer); return 1; }
|
Well I added it, now I get 14 errors. BTW, Im using GF edit.. so Im really confuzed,  .
|
He was just giving you an example, post your /selldrugs command & i'll add it.