#include <a_samp>#include <fixchars>#define COLOR_DARKGOLD 0x808000AA#define COLOR_RED 0xFF0000AA new Float:UTTCP[][3] ={{-198.9397,1200.7389,19.2109},{-198.8139,1102.5273,19.2109},{-265.6208,1100.9165,19.2109},{-307.8145,1101.0642,19.3189},{-278.9261,1048.2590,19.3165},{-208.7537,1015.4998,19.3124},{-187.1165,1083.9224,19.3120},{-122.5049,1095.8171,19.3190},{-68.4627,1056.6543,19.3189},{-13.1399,1085.2062,19.3145},{30.7575,1141.9417,19.3189}}; new utt = 0; public OnFilterScriptInit(){ Create3DTextLabel(\"Uttisztitó munka:\\n/utt hogy elkezd\", 0x008080FF, 60.7443,1188.3911,18.8296, 40.0, 0, 0);AddStaticVehicle(574,52.2531,1185.4080,18.8829,306.0154,1,1); // utt1AddStaticVehicle(574,62.0376,1186.1332,18.7899,313.7253,1,1); // utt2AddStaticVehicle(574,69.6886,1185.7770,18.7278,324.5579,1,1); // utt3}public OnPlayerCommandText(playerid, cmdtext[]){if (strcmp(\"/utt\", cmdtext, true, 10) == 0){ if(GetVehicleModel(GetPlayerVehicleID(playerid)) == 574) { utt = 1; new rand = random(sizeof(UTTCP)); SetPlayerCheckpoint(playerid, UTTCP[rand][0],UTTCP[rand][1],UTTCP[rand][2], 4); GameTextForPlayer(playerid, \"~g~Elkezdtaed a munkát!\", 3000, 3); return 1; }SendClientMessage(playerid, COLOR_DARKGOLD,\"Uttisztitó kocsiba kell hogy legyél\");}return 1;}public OnPlayerEnterCheckpoint(playerid){{ { new rand = random(sizeof(UTTCP)); SetPlayerCheckpoint(playerid, UTTCP[rand][0],UTTCP[rand][1],UTTCP[rand][2], 4); }}{ { new rand = random(sizeof(UTTCP)); SetPlayerCheckpoint(playerid, UTTCP[rand][0],UTTCP[rand][1],UTTCP[rand][2], 4); new amt = random(30); GivePlayerMoney(playerid, amt);}}return 1;}public OnPlayerEnterVehicle(playerid, vehicleid, ispassenger){ if(GetVehicleModel(GetPlayerVehicleID(playerid)) == 574) { SendClientMessage(playerid, COLOR_RED, \"HASZNÁLD:/utt\"); } return 1;}public OnPlayerExitVehicle(playerid, vehicleid){if((utt) == 1){ utt = 0; DisablePlayerCheckpoint(playerid);}else if((utt) == 0){ }}public OnPlayerDeath(playerid, killerid, reason){ DisablePlayerCheckpoint(playerid); utt = 0; return 1;}
SetTimerEx(\"munkabefejez\",1000*120,0,\"d\",playerid);
forward munkabefejez(playerid);public munkabefejez(playerid){utt = 0;DisablePlayerCheckpoint(playerid);}
#include <a_samp>#include <fixchars>#define COLOR_DARKGOLD 0x808000AA#define COLOR_RED 0xFF0000AAforward Uttvege(playerid); new Float:UTTCP[][3] ={{-198.9397,1200.7389,19.2109},{-198.8139,1102.5273,19.2109},{-265.6208,1100.9165,19.2109},{-307.8145,1101.0642,19.3189},{-278.9261,1048.2590,19.3165},{-208.7537,1015.4998,19.3124},{-187.1165,1083.9224,19.3120},{-122.5049,1095.8171,19.3190},{-68.4627,1056.6543,19.3189},{-13.1399,1085.2062,19.3145},{30.7575,1141.9417,19.3189}}; new utt[MAX_PLAYERS] = 0; public OnFilterScriptInit(){ Create3DTextLabel(\"Uttisztitó munka:\\n/utt hogy elkezd\", 0x008080FF, 60.7443,1188.3911,18.8296, 40.0, 0, 0);AddStaticVehicle(574,52.2531,1185.4080,18.8829,306.0154,1,1); // utt1AddStaticVehicle(574,62.0376,1186.1332,18.7899,313.7253,1,1); // utt2AddStaticVehicle(574,69.6886,1185.7770,18.7278,324.5579,1,1); // utt3}public OnPlayerCommandText(playerid, cmdtext[]){if (strcmp(\"/utt\", cmdtext, true, 10) == 0){ if(GetVehicleModel(GetPlayerVehicleID(playerid)) == 574) { utt[playerid] = 1; new rand = random(sizeof(UTTCP)); SetPlayerCheckpoint(playerid, UTTCP[rand][0],UTTCP[rand][1],UTTCP[rand][2], 4); GameTextForPlayer(playerid, \"~g~Elkezdtaed a munkát!\", 3000, 3); SetTimerEx(\"Uttvege\", 60*1000*2, false, \"d\", playerid); return 1; }SendClientMessage(playerid, COLOR_DARKGOLD,\"Uttisztitó kocsiba kell hogy legyél\");}return 1;}public Uttvege(playerid){SendClientMessage(playerid,-1,\"Úttisztítás letelt! Lejárt a 2perc!\");utt[playerid] = 0;}public OnPlayerEnterCheckpoint(playerid){if(utt[playerid] == 1){ new rand = random(sizeof(UTTCP)); SetPlayerCheckpoint(playerid, UTTCP[rand][0],UTTCP[rand][1],UTTCP[rand][2], 4);}else{ new rand = random(sizeof(UTTCP));SetPlayerCheckpoint(playerid, UTTCP[rand][0],UTTCP[rand][1],UTTCP[rand][2], 4);new amt = random(30);GivePlayerMoney(playerid, amt);}return 1;}public OnPlayerEnterVehicle(playerid, vehicleid, ispassenger){ if(GetVehicleModel(GetPlayerVehicleID(playerid)) == 574) { SendClientMessage(playerid, COLOR_RED, \"HASZNÁLD:/utt\"); } return 1;}public OnPlayerExitVehicle(playerid, vehicleid){if(utt[playerid] == 1){ utt[playerid] = 0; DisablePlayerCheckpoint(playerid);}else if(utt[playerid] == 0){ }return 1;}public OnPlayerDeath(playerid, killerid, reason){ if(utt[playerid] == 1) { SendClientMessage(playerid,-1,\"Meghaltál vége a munkának!\"); DisablePlayerCheckpoint(playerid); utt[playerid] = 0; } return 1;}