I'm having a problem with this command.
#8

Quote:
Originally Posted by rangerxxll
Посмотреть сообщение
At the end, where do I put
pawn Код:
Delivery[playerid] = 0;
?
when complete delivery

Quote:
Originally Posted by Kush
Посмотреть сообщение
Explain to me what is 'wrong about my code'?
you forgot to set to 1 when it is already doing the delivery and the array is a set with another and with this would be the correct

pawn Код:
COMMAND:delivery(playerid, params[])
{
    new bool:simplejobrunning[MAX_PLAYERS];
    if(!IsPlayerInRangeOfPoint(playerid, 7.0, 1829.40002441,-1075.30004883,23.39999962)) return SendClientMessage(playerid, COLOR_RED, "You're not near the delivery spot!");
    if(simplejobrunning[playerid] == false) return SendClientMessage(playerid, COLOR_RED, "You haven't started the job yet!");
    GivePlayerMoney(playerid, 7500);
     SendClientMessage(playerid, blue, "Congratulations, you have earned 7500");
     simplejobrunning[playerid] = 1; // here
     return 1;
}
Reply


Messages In This Thread

Forum Jump:


Users browsing this thread: 1 Guest(s)