Job Timer
#1

Hello How can i do when i finish my checkpoints job and can work again after 1 hour, and respawn vehicle again to old place ?.

pawn Код:
SendClientMessage(playerid,COLOR_YELLOW,"You finished job and you earn $75.");
         GivePlayerMoney(playerid, 75);
         SetPlayerColor(playerid, TeamInfo[PlayerInfo[playerid][pMember]][TeamColor]);
         RemovePlayerFromVehicle(playerid);
         DisablePlayerCheckpoint(playerid);
         sweeper[playerid] = 0;
         }
     }
Reply
#2

Код:
if (strcmp("/startimer", cmdtext, true, 6) == 0)//or OnPlayerEnterCheckpoint(playerid)
    {
      new Float:x;new Float:y;new Float:z;
      GetPlayerPos(playerid, x, y, z);
      new v;
      v=CreateVehicle(571, x+3, y, z, 900.00, -1, -1, -1);
      PutPlayerInVehicle(playerid, v,0);
      SetTimerEx("work",3000,0,"i",playerid);
      sweeper[playerid] = 1;
      return 1;
    }



forward work(playerid);
public work(playerid)
{
SendClientMessage(playerid,COLOR_YELLOW,"You finished job and you earn $75.");
GivePlayerMoney(playerid, 75);
SetPlayerColor(playerid, TeamInfo[PlayerInfo[playerid][pMember]][TeamColor]);
RemovePlayerFromVehicle(playerid);
DisablePlayerCheckpoint(playerid);
sweeper[playerid] = 0;
SetTimerEx("work1",1 hour,0,"i",playerid);
return 1;
}



forward work1(playerid);
public work1(playerid)
{
SendClientMessage(playerid,COLOR_YELLOW,"type /work for a new job ");
return 1;
}

Код:
SetTimerEx("work",3000,0,"i",playerid);
3000 = 3 second
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)