new UttJob[MAX_PLAYERS];new KukaJob[MAX_PLAYERS];public OnPlayerCommandText(playerid, cmdtext[]) { if(!strcmp(\"/munka\",cmdtext)) { if(IsPlayerInRangeOfPoint(playerid, 5.0, 2102.7422,-1804.0856,13.5547)) { KukaJob[playerid] = 1; SetPlayerCheckpoint(playerid,1843.8240,-1306.3604,13.3899,3); } if(IsPlayerInRangeOfPoint(playerid, 5.0, 1939.0388,2155.0005,10.8203)) { UttJob[playerid] = 1; SetPlayerCheckpoint(playerid,1927.9983,2163.2249,10.6719,3); } public OnPlayerEnterCheckpoint(playerid){ if(UttJob[playerid] == 1){ UttJob[playerid] = 2; SetPlayerCheckpoint(playerid,1927.9983,2163.2249,10.6719,3); return 1; } if(UttJob[playerid] == 2){ UttJob[playerid] = 3; SetPlayerCheckpoint(playerid,1866.2133,2173.1252,10.6719,3); return 1; } if(UttJob[playerid] == 3){ UttJob[playerid] = 4; SetPlayerCheckpoint(playerid,1739.3602,2173.3799,10.6935,3); return 1; } if(UttJob[playerid] == 4){ UttJob[playerid] = 5; SetPlayerCheckpoint(playerid,1707.4702,2136.3660,10.6719,3); return 1; } if(UttJob[playerid] == 5){ UttJob[playerid] = 0; DisablePlayerCheckpoint(playerid); GivePlayerMoney(playerid,5000); return 1; }//=======================================================================================////=======================================================================================////=======================================================================================////=======================================================================================//if(KukaJob[playerid] == 1){ KukaJob[playerid] = 2; SetPlayerCheckpoint(playerid,1843.8240,-1306.3604,13.3899,3); return 1; } if(KukaJob[playerid] == 2){ KukaJob[playerid] = 3; SetPlayerCheckpoint(playerid,1742.1877,-1302.0734,13.4688,3); return 1; } if(KukaJob[playerid] == 3){ KukaJob[playerid] = 4; SetPlayerCheckpoint(playerid,1612.0052,-1317.0580,17.2955,3); return 1; } if(KukaJob[playerid] == 4){ KukaJob[playerid] = 5; SetPlayerCheckpoint(playerid,1641.9424,-1438.4219,13.3828,3); return 1; } if(KukaJob[playerid] == 5){ KukaJob[playerid] = 0; DisablePlayerCheckpoint(playerid); GivePlayerMoney(playerid,5000); return 1;}return 1;}
Dupla hozzászólás automatikusan összefûzve. ( 2013. augusztus 22. - 19:08:08 )Az esetleg nem lehet jogy valamit rosszul zártam le és azért keveredik? :hmmm:
UttJob[playerid] = 1;helyett:UttJon[playerid]++;
Uttjon[playerid]++;helyett nem:Uttjob[playerd]++;?
if(UttJob[playerid] == 5) { UttJob[playerid] = 0; // ITT A BAJ }
if(UttJob[playerid] == 1) //Ha ez 1.. és a változód 0.. akkor //össze fog keveredni, a { //munkavégzésnél.. UttJob[playerid] = 2; }
public OnPlayerEnterCheckpoint(playerid){new str[128];format(str, sizeof str, \"Út: %d, Kuka: %D\", UttJob[playerid], KukaJob[playerid]);SendClientMessage(playerid, -1, str);if(UttJob[playerid] == 1){ ........
CMD:felmond(playerid,params[]) { KukaJob = 0; UttJob = 0; DisablePlayerCheckpoint(playerid); SendClientMessage(playerid,-1,\"Felmondtál\"); return 1;}
public OnPlayerCommandText(playerid, cmdtext[]) { if(!strcmp(\"/munka\",cmdtext)) { if(IsPlayerInRangeOfPoint(playerid, 5.0, 2102.7422,-1804.0856,13.5547)) { KukaJob[playerid] = 1; SetPlayerCheckpoint(playerid,1843.8240,-1306.3604,13.3899,3); } if(IsPlayerInRangeOfPoint(playerid, 5.0, 1939.0388,2155.0005,10.8203)) { UttJob[playerid] = 1; SetPlayerCheckpoint(playerid,1927.9983,2163.2249,10.6719,3); } public OnPlayerEnterCheckpoint(playerid)
new UtCP[][] ={//Ezeket majd írd át.{x,y,z}, // Elsõ út CP{x,y,z}, //Második út CP{x,y,z} //Harmadik út CP};new KukaCP[][] ={{x,y,z}, // Elsõ kuka CP{x,y,z}, //Második kuka CP{x,y,z} //Harmadik kuka CP};new UttJob[MAX_PLAYERS];new KukaJob[MAX_PLAYERS];CMD:munka(playerid){ if(IsPlayerInRangeOfPoint(playerid, 5.0, 2102.7422,-1804.0856,13.5547)) { KukaJob[playerid] = 1; SetPlayerCheckpoint(playerid,KukaCP[KukaJob[playerid]-1][0],KukaCP[KukaJob[playerid]-1][1],KukaCP[KukaJob[playerid]-1][2],3); SendClientMessage(playerid,-1,\"Gratulálunk! Elkezdted az kukás munkát!\");} else if(IsPlayerInRangeOfPoint(playerid, 5.0, 1939.0388,2155.0005,10.8203)) { UttJob[playerid] = 1; SetPlayerCheckpoint(playerid,UtCP[uttJob[playerid]-1][0],UtCP[uttJob[playerid]-1][1],UtCP[uttJob[playerid]-1][2],3); SendClientMessage(playerid,-1,\"Gratulálunk! Elkezdted az úttisztitó munkát!\"); } else return SendClientMessage(playerid,-1,\"Nem vagy munkahelynél\");return 1;}CMD:felmond(playerid){if(UttJob[playerid] != 0){SendClientMessage(playerid,-1,\"Felmondtál az úttisztító munkából!\"); UttJob[playerid] = 0;DisablePlayerCheckpoint(playerid);}if(KukaJob[playerid] != 0){SendClientMessage(playerid,-1,\"Felmondtál a kukás munkából!\"); UttJob[playerid] = 0;DisablePlayerCheckpoint(playerid);}return 1;}public OnPlayerEnterCheckpoint(playerid){switch(UttJob[playerid]){ case 1: { SetPlayerCheckpoint(playerid,UtCP[uttJob[playerid]-1][0],UtCP[uttJob[playerid]-1][1],UtCP[uttJob[playerid]-1][2],3); UttJob[playerid]++;}case 2: { SetPlayerCheckpoint(playerid,UtCP[uttJob[playerid]-1][0],UtCP[uttJob[playerid]-1][1],UtCP[uttJob[playerid]-1][2],3); UttJob[playerid]++;}case 3: { UttJob[playerid] = 0; DisablePlayerCheckpoint(playerid);}}switch(KukaJob[playerid]){ case 1: { SetPlayerCheckpoint(playerid,KukaCP[KukaJob[playerid]-1][0],KukaCP[KukaJob[playerid]-1][1],KukaCP[KukaJob[playerid]-1][2],3); KukaJob[playerid]++;}case 2: { SetPlayerCheckpoint(playerid,KukaCP[KukaJob[playerid]-1][0],KukaCP[KukaJob[playerid]-1][1],KukaCP[KukaJob[playerid]-1][2],3); KukaJob[playerid]++;}case 1: { KukaJob[playerid] == 0; DisablePlayerCheckpoint(playerid);}}return 1;}
D:\\SZERVER\\filterscripts\\levelsystem.pwn(10) : warning 213: tag mismatchD:\\SZERVER\\filterscripts\\levelsystem.pwn(10) : warning 213: tag mismatchD:\\SZERVER\\filterscripts\\levelsystem.pwn(10) : warning 213: tag mismatchD:\\SZERVER\\filterscripts\\levelsystem.pwn(11) : warning 213: tag mismatchD:\\SZERVER\\filterscripts\\levelsystem.pwn(11) : warning 213: tag mismatchD:\\SZERVER\\filterscripts\\levelsystem.pwn(11) : warning 213: tag mismatchD:\\SZERVER\\filterscripts\\levelsystem.pwn(12) : warning 213: tag mismatchD:\\SZERVER\\filterscripts\\levelsystem.pwn(12) : warning 213: tag mismatchD:\\SZERVER\\filterscripts\\levelsystem.pwn(12) : warning 213: tag mismatchD:\\SZERVER\\filterscripts\\levelsystem.pwn(16) : warning 213: tag mismatchD:\\SZERVER\\filterscripts\\levelsystem.pwn(16) : warning 213: tag mismatchD:\\SZERVER\\filterscripts\\levelsystem.pwn(16) : warning 213: tag mismatchD:\\SZERVER\\filterscripts\\levelsystem.pwn(17) : warning 213: tag mismatchD:\\SZERVER\\filterscripts\\levelsystem.pwn(17) : warning 213: tag mismatchD:\\SZERVER\\filterscripts\\levelsystem.pwn(17) : warning 213: tag mismatchD:\\SZERVER\\filterscripts\\levelsystem.pwn(18) : warning 213: tag mismatchD:\\SZERVER\\filterscripts\\levelsystem.pwn(18) : warning 213: tag mismatchD:\\SZERVER\\filterscripts\\levelsystem.pwn(18) : warning 213: tag mismatch
new UtCP[][] = { //Ezeket majd írd át. {1927.9983,2163.2249,10.6719}, // Elsõ út CP {1866.2133,2173.1252,10.6719}, //Második út CP {1739.3602,2173.3799,10.6935} //Harmadik út CP }; new KukaCP[][] = { {1935.5259,-1885.7679,13.5344}, // Elsõ kuka CP {1846.3779,-1886.4840,13.4317}, //Második kuka CP {1878.2389,-1737.6797,13.3552} //Harmadik kuka CP };