Commands help..
#1

Hello, i have 2 commands and they are the same but the coalmine command timer for waiting to start again the job work, but sweep timer dont work.. What is the problem?

Код:
   	if (strcmp("/sweep", cmdtext, true, 10) == 0)
	{
        if(IsPlayerInRangeOfPoint(playerid, 10.0, 583.9775,1225.9344,11.7188))
      	{
			if(PlayerInfo[playerid][pSweep1] != 0)
			{
				        format(string, sizeof(string), "В момента не можеш да работиш тази работа!");
            SendClientMessage(playerid, COLOR_GRAD1, string);
   return 1;
    }
            sweep[playerid] = 1;
     		SetPlayerColor(playerid, COLOR_JOB);
            ToggleEngine(carsweep[1], VEHICLE_PARAMS_ON);
            ToggleEngine(carsweep[2], VEHICLE_PARAMS_ON);
            ToggleEngine(carsweep[3], VEHICLE_PARAMS_ON);
            ToggleEngine(carsweep[4], VEHICLE_PARAMS_ON);
            SetPlayerVirtualWorld(playerid, 229);
			SetPlayerCheckpoint(playerid, SweepCheckPoint1, 3.0);
	        format(string, sizeof(string), "Sweep: Ти започна работа като чистач на улиците, качи се превозното средство и следвай червените маркери!");
            SendClientMessage(playerid, COLOR_GREEN, string);
			return 1;
        } else {
        SendClientMessage(playerid, COLOR_GRAD1,"Трябва да се качиш в самосвала, за да започнеш работа!");
		}

    return 1;
    }
Код:
	if (strcmp("/coalmine", cmdtext, true, 10) == 0)
	{
        if(IsPlayerInRangeOfPoint(playerid, 10.0, 816.5459,857.0498,12.7891))
      	{
			if(PlayerInfo[playerid][pCoalmine1] != 0)
			{
				        format(string, sizeof(string), "В момента не можеш да работиш тази работа!");
            SendClientMessage(playerid, COLOR_GRAD1, string);
   return 1;
    }
            coalmine[playerid] = 1;
     		SetPlayerColor(playerid, COLOR_JOB);
            ToggleEngine(carcoalmine[1], VEHICLE_PARAMS_ON);
            ToggleEngine(carcoalmine[2], VEHICLE_PARAMS_ON);
            ToggleEngine(carcoalmine[3], VEHICLE_PARAMS_ON);
            ToggleEngine(carcoalmine[4], VEHICLE_PARAMS_ON);
            SetPlayerVirtualWorld(playerid, 224);
			SetPlayerCheckpoint(playerid, CoalmineCheckPoint1, 3.0);
	        format(string, sizeof(string), "Coalmine: Ти започна работа като шофьор на самосвал, качи се самосвала и следвай червените маркери!");
            SendClientMessage(playerid, COLOR_GREEN, string);
			return 1;
        } else {
        SendClientMessage(playerid, COLOR_GRAD1,"Трябва да се качиш в самосвала, за да започнеш работа!");
		}

    return 1;
    }
Reply
#2

Help, please..
Reply
#3

I fix the problem.
Reply
#4

what SweepCheckPoint1 refer to ?

edit : delete
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)