public OnPlayerEnterCheckpoint(playerid) { new string[128]; ClearAnimations(playerid); ApplyAnimation(playerid,"CARRY","crry_prtial",4.0, 1,0,0,1,1,1); if(IsPlayerInRangeOfPoint(playerid, 6.0, 2341.5623,-711.7615,131.846 ![]() { startjobd[playerid] = true; ApplyAnimation(playerid,"CHAINSAW","WEAPON_csaw",4 .1,1,0,0,0,11000); GivePlayerWeapon(playerid, 9, 1); DisablePlayerCheckpoint(playerid); timecutt[playerid] = SetTimerEx("TimeDrov",9800,false,"i", playerid); return 1; } else if(IsPlayerInRangeOfPoint(playerid, 3.0, 2341.5623,-711.7615,131.846 ![]() { startjobd[playerid] = false; cuttrands = random(sizeof(randomcutt)); kgcutt[playerid] += randomcutt[cuttrands][0]; if(IsPlayerAttachedObjectSlotUsed(playerid,1)) RemovePlayerAttachedObject(playerid,1);// if(IsPlayerAttachedObjectSlotUsed(playerid,3)) RemovePlayerAttachedObject(playerid,3);// format(string, sizeof(string), "The total number of hardwood %d",kgcutt[playerid]); SendClientMessage(playerid, -1, string); format(string, sizeof(string), "You cut down hardwood %d ",randomcutt[cuttrands][0]); SendClientMessage(playerid, -1, string); // cutter+=randomcutt[cuttrands][0]; cutt+=randomcutt[cuttrands][0]; cutt ++; ApplyAnimation(playerid,"PED","IDLE_tired",4.1,1,0 ,0,0,2500); SetPlayerCheckpoint(playerid, 2341.5623,-711.7615,131.8468,1.0); UpdateMine(); return 1; } return 1; } public TimeDrov(playerid) { if(startjobd[playerid] == true) { ResetPlayerWeapons(playerid); SetPlayerAttachedObject(playerid, 1, 1463, 1,0.20,0.36,0.0,0.0,90.0, 0.0, 0.4, 0.3, 0.6); ApplyAnimation(playerid,"CARRY","crry_prtial",4.0, 1,0,0,1,1,1); SetPlayerCheckpoint(playerid,2325.7036,-662.3818,130.6063,1.0); } return 1; } public OnPlayerDisconnect(playerid) { woodcutter[playerid] = false;// return 1; } UpdateMine() { new string[56]; format(string,sizeof(string),"In Stock:\n %d Wood",cutt); Update3DTextLabelText(cutterd, COLOR_YELLOW3d, string); SaveMine(); return 1; } stock SaveMine() { new ok[200]; format(ok,sizeof(ok),"INSERT INTO mine (cutt) VALUES (%d)", cutt); return 1; } |