public OnGameModeInit(){ SetTimer(\"flyhack\", 1000, true);
new timer[MAX_PLAYERS];new savetp[MAX_PLAYERS];new dives[MAX_PLAYERS];//new flyhack;forward flyhack(playerid); // prototípuspublic flyhack(playerid)//public OnPlayerUpdate(playerid){ if(GetPlayerAnimationIndex(playerid)){new animlib[32];new animname[32];GetAnimationName(GetPlayerAnimationIndex(playerid),animlib,32,animname,32);if(strcmp(animlib, \"SWIM\", true) == 0){new Float:X,Float:Y,Float:Z;GetPlayerPos(playerid,X,Y,Z);if(Z >= 8.45){if(!IsPlayerInRangeOfPoint(playerid,37.85,1964.0404,-1199.6774,17.4400)){dives[playerid] = 1;}}}GetAnimationName(GetPlayerAnimationIndex(playerid),animlib,32,animname,32);if(strcmp(animname, \"FALL_FALL\", true) == 0){new Float:X,Float:Y,Float:Z;GetPlayerPos(playerid,X,Y,Z);SetPVarFloat(playerid,\"Float\",Z);SetTimer(\"Checkhim\",1200,false);}} new index = GetPlayerAnimationIndex(playerid);if(index >= 958 && index <= 962) { if(GetPlayerWeapon(playerid) != 46) {dives[playerid] = 1; } } if(dives[playerid] == 1){SendReportToAdmins(playerid, \"Fly-hack\", true);//SendClientMessage(playerid,0xC30000FF,\"You are kicked Reason: Flyhack\");//Kick(playerid); for(new i = 0; i < MAX_PLAYERS; i++) { if(IsPlayerAdmin(i)) { new string[100]; new name[100]; format(string,sizeof(string),\"%s has been kicked Reason: Flyhack\",GetPlayerName(playerid,name,sizeof(name))); SendClientMessage(i,0xC30000FF,string); } }}return 1;}stock SetPlayerPosition(pid,Float:X,Float:Y,Float:Z){savetp[pid] = 1;SetPlayerPos(pid,X,Y,Z);KillTimer(timer[pid]);timer[pid] = SetTimer(\"remtp\",15000,false);}forward remtp(playerid);public remtp(playerid){savetp[playerid] = 0;return 1;}forward Checkhim(playerid);public Checkhim(playerid){new Float:X,Float:Y,Float:Z;GetPlayerPos(playerid,X,Y,Z);if(Z > GetPVarFloat(playerid,\"Float\")){if(savetp[playerid] != 1){dives[playerid] = 1;}}return 1;}
public OnPlayerConnect(playerid){ SetTimerEx(\"flyhack\", 1000, true, \"d\", playerid);
new timer[MAX_PLAYERS];new savetp[MAX_PLAYERS];new dives[MAX_PLAYERS];forward flyhack(playerid); // prototípuspublic flyhack(playerid){ if(GetPlayerAnimationIndex(playerid)){new animlib[32];new animname[32];GetAnimationName(GetPlayerAnimationIndex(playerid),animlib,32,animname,32);if(strcmp(animlib, \"SWIM\", true) == 0){new Float:X,Float:Y,Float:Z;GetPlayerPos(playerid,X,Y,Z);if(Z >= 8.45){if(!IsPlayerInRangeOfPoint(playerid,37.85,1964.0404,-1199.6774,17.4400)){dives[playerid] = 1;}}}GetAnimationName(GetPlayerAnimationIndex(playerid),animlib,32,animname,32);if(strcmp(animname, \"FALL_FALL\", true) == 0){new Float:X,Float:Y,Float:Z;GetPlayerPos(playerid,X,Y,Z);SetPVarFloat(playerid,\"Float\",Z);SetTimer(\"Checkhim\",1200,false, \"d\", playerid);}} new index = GetPlayerAnimationIndex(playerid);if(index >= 958 && index <= 962) { if(GetPlayerWeapon(playerid) != 46) {dives[playerid] = 1; } } if(dives[playerid] == 1){SendReportToAdmins(playerid, \"Fly-hack\", true);//SendClientMessage(playerid,0xC30000FF,\"You are kicked Reason: Flyhack\");//Kick(playerid); for(new i = 0; i < MAX_PLAYERS; i++) { if(IsPlayerAdmin(i)) { new string[100]; new name[100]; format(string,sizeof(string),\"%s has been kicked Reason: Flyhack\",GetPlayerName(playerid,name,sizeof(name))); SendClientMessage(i,0xC30000FF,string); } }}return 1;}stock SetPlayerPosition(pid,Float:X,Float:Y,Float:Z){savetp[pid] = 1;SetPlayerPos(pid,X,Y,Z);KillTimer(timer[pid]);timer[pid] = SetTimer(\"remtp\",15000,false, \"d\", playerid);}forward remtp(playerid);public remtp(playerid){savetp[playerid] = 0;return 1;}forward Checkhim(playerid);public Checkhim(playerid){new Float:X,Float:Y,Float:Z;GetPlayerPos(playerid,X,Y,Z);if(Z > GetPVarFloat(playerid,\"Float\")){if(savetp[playerid] != 1){dives[playerid] = 1;}}return 1;}
Helló!225.630997,1022.47998,1084.069946 lévõ koordinátán mi a ház neve?Összesen hány interior van? Olyan fs-eket találtam csak amiben 146 van, de láttam egy oldalt, ahol 180 valamennyit írnak. :hmmm:
if(!response) return 0; helyett: if(!response) return cmd_cmds(playerid, params);
if(!response) return 0;
if(!response) return cmd_cmds(playerid, params);
if(!response) return CallRemoteFunction(\"OnPlayerCommandText\",\"is\",playerid, \"/cmds\");
és ha nem zcmd-t használ?
és ha nem zcmd-t használ? Nézd már meg a példát amit írt és kiderül [/quote]lol.tényleg de attól még a callremotefunction hasznosabb, mivel ezt csak behelyezi...nem kell mást átírogatni, ha params-al teszi be, akkor nem fogja felismerni, ha anélkül, akkor meg a parancsból kell kivenni. Én jobbnak tartom
public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[]){ if(dialogid == Dialog_parancsok) { if(!response) return cmd_cmds(playerid);if(listitem == 0) { new DIALOGstringx[4000]; format(DIALOGstringx, sizeof(DIALOGstringx),\"%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s\",\"{b5b3af}Felhasználói Parancsok: \\n\",\" \\n\",\"{D9CC79}Hamarosan! \\n\",\"{D9CC79} {b5b3af} \\n\", \"{b5b3af}\\n \\n\");ShowPlayerDialog(playerid, DIALOG_FELHASZNALOCMD, DIALOG_STYLE_MSGBOX, \"{b5b3af}Felhasználói Parancsok:\", DIALOGstringx, \"Vissza\",\"\");}if(listitem == 1) { new DIALOGstringx[4050]; format(DIALOGstringx, sizeof(DIALOGstringx),\"%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s\",\"{b5b3af}Széf Parancsok: \\n\",\" \\n\",\"{D9CC79}/ÚjSzéf [széf Jelszava] {b5b3af}- Egy Újszéf létrehozása[Csak Tulajdonosnak]! \\n\",\"{D9CC79}/SzéfNyit [széf Jelszava] {b5b3af}- Széfed kinyitása! \\n\",\"{D9CC79}/SzéfPénz {b5b3af}- Széf Összeg tartalmának megtekintése! \\n\",\"{D9CC79}/SzéfKivesz [Összeg] {b5b3af}- Széfbõl egy bizonyos összeg kivétele! \\n\",\"{D9CC79}/SzéfBetesz [Összeg] {b5b3af}- Széfbe egy bizonyos összeg berakása! \\n\",\"{D9CC79}/SzéfZár {b5b3af}- Széf bezárása! \\n\", \"{b5b3af}\\n \\n\");ShowPlayerDialog(playerid, DIALOG_SZEFCMD, DIALOG_STYLE_MSGBOX, \"{b5b3af}Széf Parancsok:\", DIALOGstringx, \"Vissza\",\"\");}}if(dialogid == DIALOG_HARC) {if(response == 1){ switch(listitem) { case 0: { SetPlayerFightingStyle (playerid, FIGHT_STYLE_NORMAL); SendClientMessage(playerid, 0x38FF06FF, \"Sikeresen kicserélted a harcstílusod!: normál!\" ); } case 1: { SetPlayerFightingStyle (playerid, FIGHT_STYLE_BOXING); SendClientMessage(playerid, 0x38FF06FF, \"Sikeresen kicserélted a harcstílusod!: box!\" ); } case 2: { SetPlayerFightingStyle (playerid, FIGHT_STYLE_KUNGFU); SendClientMessage(playerid, 0x38FF06FF, \"Sikeresen kicserélted a harcstílusod!: Kung Fu!\" ); } case 3: { SetPlayerFightingStyle (playerid, FIGHT_STYLE_ELBOW); SendClientMessage(playerid, 0x38FF06FF, \"Sikeresen kicserélted a harcstílusod!: Elbow!\" ); } case 4: { SetPlayerFightingStyle (playerid, FIGHT_STYLE_KNEEHEAD); SendClientMessage(playerid, 0x38FF06FF, \"Sikeresen kicserélted a harcstílusod!: Kneehead!\" ); } case 5: { SetPlayerFightingStyle (playerid, FIGHT_STYLE_GRABKICK); SendClientMessage(playerid, 0x38FF06FF, \"Sikeresen kicserélted a harcstílusod!: Grabkick!\" ); } }}else{ SendClientMessage(playerid, 0xEB000FFF, \"Kiléptél a menübõl.\");}}if(dialogid == DIALOG_MYSIG) {if(!response) return 0;new String[144];if(!(2 < strlen(inputtext) < 19)) {SendClientMessage(playerid, 0xFF0000AA, \"A titulosodnak minimum 3, maximum 18 karakteresnek kell lennie!\");//return 1;}dini_Set(\"MySig.ini\", pName(playerid), inputtext);format(String, sizeof(String), \"Sikeresen beállítottad a titulosod! Megadott szöveg: %s\", inputtext);SendClientMessage(playerid, 0x00FF00AA, String);SendClientMessage(playerid, 0xFFFFFFAA, \"Tipp: A titulus kikapcsolásához használd a /mysigoff parancsot!\");SetPVarString(playerid, \"MySig\", inputtext);} if(dialogid == Dialog_color) { if(!response) return 0;if(listitem == 0) {SetPVarString(playerid, \"NameColor\", \"{ffffff}\");dini_Set(\"NameColor.ini\", pName(playerid), \"{ffffff}\");}if(listitem == 1) {SetPVarString(playerid, \"NameColor\", \"{33CCFF}\");dini_Set(\"NameColor.ini\", pName(playerid), \"{33CCFF}\");}if(listitem == 2) {SetPVarString(playerid, \"NameColor\", \"{E60000}\");dini_Set(\"NameColor.ini\", pName(playerid), \"{E60000}\");}if(listitem == 3) {SetPVarString(playerid, \"NameColor\", \"{9900FF}\");dini_Set(\"NameColor.ini\", pName(playerid), \"{9900FF}\");}if(listitem == 4) {SetPVarString(playerid, \"NameColor\", \"{6e3d20}\");dini_Set(\"NameColor.ini\", pName(playerid), \"{6e3d20}\");}if(listitem == 5) {SetPVarString(playerid, \"NameColor\", \"{2ED683}\");dini_Set(\"NameColor.ini\", pName(playerid), \"{2ED683}\");}if(listitem == 6) {SetPVarString(playerid, \"NameColor\", \"{FFFF00}\");dini_Set(\"NameColor.ini\", pName(playerid), \"{FFFF00}\");}if(listitem == 7) {SetPVarString(playerid, \"NameColor\", \"{FF9933}\");dini_Set(\"NameColor.ini\", pName(playerid), \"{FF9933}\");}if(listitem == {SetPVarString(playerid, \"NameColor\", \"{CECECE}\");dini_Set(\"NameColor.ini\", pName(playerid), \"{CECECE}\");}if(listitem == 9) {SetPVarString(playerid, \"NameColor\", \"{ea00ff}\");dini_Set(\"NameColor.ini\", pName(playerid), \"{ea00ff}\");}} if(dialogid == Dialog_cb) { if(!response) return 0;if(listitem == 0) {SetPVarString(playerid, \"ChatColor\", \"{ffffff}\");dini_Set(\"ChatColor.ini\", pName(playerid), \"{ffffff}\");}if(listitem == 1) {SetPVarString(playerid, \"ChatColor\", \"{33CCFF}\");dini_Set(\"ChatColor.ini\", pName(playerid), \"{33CCFF}\");}if(listitem == 2) {SetPVarString(playerid, \"ChatColor\", \"{E60000}\");dini_Set(\"ChatColor.ini\", pName(playerid), \"{E60000}\");}if(listitem == 3) {SetPVarString(playerid, \"ChatColor\", \"{9900FF}\");dini_Set(\"ChatColor.ini\", pName(playerid), \"{9900FF}\");}if(listitem == 4) {SetPVarString(playerid, \"ChatColor\", \"{6e3d20}\");dini_Set(\"ChatColor.ini\", pName(playerid), \"{6e3d20}\");}if(listitem == 5) {SetPVarString(playerid, \"ChatColor\", \"{2ED683}\");dini_Set(\"ChatColor.ini\", pName(playerid), \"{2ED683}\");}if(listitem == 6) {SetPVarString(playerid, \"ChatColor\", \"{FFFF00}\");dini_Set(\"ChatColor.ini\", pName(playerid), \"{FFFF00}\");}if(listitem == 7) {SetPVarString(playerid, \"ChatColor\", \"{FF9933}\");dini_Set(\"ChatColor.ini\", pName(playerid), \"{FF9933}\");}if(listitem == {SetPVarString(playerid, \"ChatColor\", \"{CECECE}\");dini_Set(\"ChatColor.ini\", pName(playerid), \"{CECECE}\");}if(listitem == 9) {SetPVarString(playerid, \"ChatColor\", \"{ea00ff}\");dini_Set(\"ChatColor.ini\", pName(playerid), \"{ea00ff}\");}}return 1;}CMD:cmds(playerid){ShowPlayerDialog(playerid, Dialog_parancsok, DIALOG_STYLE_LIST, \"{CDF917}Teszt Szeró Parancsok:\", \"{ffffff}Felhasználói Parancsok:\\n{33CCFF}Széf Parancsok:\\n\", \"Választ\", \"Bezár\");return 1;}
public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[]){ if(dialogid == Dialog_parancsok) { if(!response) return ShowPlayerDialog(playerid, Dialog_parancsok, DIALOG_STYLE_LIST, \"{CDF917}Teszt Szeró Parancsok:\", \"{ffffff}Felhasználói Parancsok:\\n{33CCFF}Széf Parancsok:\\n\", \"Választ\", \"Bezár\"); if(listitem == 0) { new DIALOGstringx[4000]; format(DIALOGstringx, sizeof(DIALOGstringx),\"%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s\", \"{b5b3af}Felhasználói Parancsok: \\n\", \" \\n\", \"{D9CC79}Hamarosan! \\n\", \"{D9CC79} {b5b3af} \\n\", \"{b5b3af}\\n \\n\"); ShowPlayerDialog(playerid, DIALOG_FELHASZNALOCMD, DIALOG_STYLE_MSGBOX, \"{b5b3af}Felhasználói Parancsok:\", DIALOGstringx, \"Vissza\",\"\"); } if(listitem == 1) { new DIALOGstringx[4050]; format(DIALOGstringx, sizeof(DIALOGstringx),\"%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s\", \"{b5b3af}Széf Parancsok: \\n\", \" \\n\", \"{D9CC79}/ÚjSzéf [széf Jelszava] {b5b3af}- Egy Újszéf létrehozása[Csak Tulajdonosnak]! \\n\", \"{D9CC79}/SzéfNyit [széf Jelszava] {b5b3af}- Széfed kinyitása! \\n\", \"{D9CC79}/SzéfPénz {b5b3af}- Széf Összeg tartalmának megtekintése! \\n\", \"{D9CC79}/SzéfKivesz [Összeg] {b5b3af}- Széfbõl egy bizonyos összeg kivétele! \\n\", \"{D9CC79}/SzéfBetesz [Összeg] {b5b3af}- Széfbe egy bizonyos összeg berakása! \\n\", \"{D9CC79}/SzéfZár {b5b3af}- Széf bezárása! \\n\", \"{b5b3af}\\n \\n\"); ShowPlayerDialog(playerid, DIALOG_SZEFCMD, DIALOG_STYLE_MSGBOX, \"{b5b3af}Széf Parancsok:\", DIALOGstringx, \"Vissza\",\"\"); } } if(dialogid == DIALOG_HARC) { if(response == 1) { switch(listitem) { case 0: { SetPlayerFightingStyle (playerid, FIGHT_STYLE_NORMAL); SendClientMessage(playerid, 0x38FF06FF, \"Sikeresen kicserélted a harcstílusod!: normál!\" ); } case 1: { SetPlayerFightingStyle (playerid, FIGHT_STYLE_BOXING); SendClientMessage(playerid, 0x38FF06FF, \"Sikeresen kicserélted a harcstílusod!: box!\" ); } case 2: { SetPlayerFightingStyle (playerid, FIGHT_STYLE_KUNGFU); SendClientMessage(playerid, 0x38FF06FF, \"Sikeresen kicserélted a harcstílusod!: Kung Fu!\" ); } case 3: { SetPlayerFightingStyle (playerid, FIGHT_STYLE_ELBOW); SendClientMessage(playerid, 0x38FF06FF, \"Sikeresen kicserélted a harcstílusod!: Elbow!\" ); } case 4: { SetPlayerFightingStyle (playerid, FIGHT_STYLE_KNEEHEAD); SendClientMessage(playerid, 0x38FF06FF, \"Sikeresen kicserélted a harcstílusod!: Kneehead!\" ); } case 5: { SetPlayerFightingStyle (playerid, FIGHT_STYLE_GRABKICK); SendClientMessage(playerid, 0x38FF06FF, \"Sikeresen kicserélted a harcstílusod!: Grabkick!\" ); } } } else { SendClientMessage(playerid, 0xEB000FFF, \"Kiléptél a menübõl.\"); } } if(dialogid == DIALOG_MYSIG) { if(!response) return 0; new String[144]; if(!(2 < strlen(inputtext) < 19)) { SendClientMessage(playerid, 0xFF0000AA, \"A titulosodnak minimum 3, maximum 18 karakteresnek kell lennie!\"); //return 1;} dini_Set(\"MySig.ini\", pName(playerid), inputtext); format(String, sizeof(String), \"Sikeresen beállítottad a titulosod! Megadott szöveg: %s\", inputtext); SendClientMessage(playerid, 0x00FF00AA, String); SendClientMessage(playerid, 0xFFFFFFAA, \"Tipp: A titulus kikapcsolásához használd a /mysigoff parancsot!\"); SetPVarString(playerid, \"MySig\", inputtext);} if(dialogid == Dialog_color) { if(!response) return 0; if(listitem == 0) { SetPVarString(playerid, \"NameColor\", \"{ffffff}\"); dini_Set(\"NameColor.ini\", pName(playerid), \"{ffffff}\"); } if(listitem == 1) { SetPVarString(playerid, \"NameColor\", \"{33CCFF}\"); dini_Set(\"NameColor.ini\", pName(playerid), \"{33CCFF}\"); } if(listitem == 2) { SetPVarString(playerid, \"NameColor\", \"{E60000}\"); dini_Set(\"NameColor.ini\", pName(playerid), \"{E60000}\"); } if(listitem == 3) { SetPVarString(playerid, \"NameColor\", \"{9900FF}\"); dini_Set(\"NameColor.ini\", pName(playerid), \"{9900FF}\"); } if(listitem == 4) { SetPVarString(playerid, \"NameColor\", \"{6e3d20}\"); dini_Set(\"NameColor.ini\", pName(playerid), \"{6e3d20}\"); } if(listitem == 5) { SetPVarString(playerid, \"NameColor\", \"{2ED683}\"); dini_Set(\"NameColor.ini\", pName(playerid), \"{2ED683}\"); } if(listitem == 6) { SetPVarString(playerid, \"NameColor\", \"{FFFF00}\"); dini_Set(\"NameColor.ini\", pName(playerid), \"{FFFF00}\"); } if(listitem == 7) { SetPVarString(playerid, \"NameColor\", \"{FF9933}\"); dini_Set(\"NameColor.ini\", pName(playerid), \"{FF9933}\"); } if(listitem == { SetPVarString(playerid, \"NameColor\", \"{CECECE}\"); dini_Set(\"NameColor.ini\", pName(playerid), \"{CECECE}\"); } if(listitem == 9) { SetPVarString(playerid, \"NameColor\", \"{ea00ff}\"); dini_Set(\"NameColor.ini\", pName(playerid), \"{ea00ff}\"); }} if(dialogid == Dialog_cb) { if(!response) return 0; if(listitem == 0) { SetPVarString(playerid, \"ChatColor\", \"{ffffff}\"); dini_Set(\"ChatColor.ini\", pName(playerid), \"{ffffff}\"); } if(listitem == 1) { SetPVarString(playerid, \"ChatColor\", \"{33CCFF}\"); dini_Set(\"ChatColor.ini\", pName(playerid), \"{33CCFF}\"); } if(listitem == 2) { SetPVarString(playerid, \"ChatColor\", \"{E60000}\"); dini_Set(\"ChatColor.ini\", pName(playerid), \"{E60000}\"); } if(listitem == 3) { SetPVarString(playerid, \"ChatColor\", \"{9900FF}\"); dini_Set(\"ChatColor.ini\", pName(playerid), \"{9900FF}\"); } if(listitem == 4) { SetPVarString(playerid, \"ChatColor\", \"{6e3d20}\"); dini_Set(\"ChatColor.ini\", pName(playerid), \"{6e3d20}\"); } if(listitem == 5) { SetPVarString(playerid, \"ChatColor\", \"{2ED683}\"); dini_Set(\"ChatColor.ini\", pName(playerid), \"{2ED683}\"); } if(listitem == 6) { SetPVarString(playerid, \"ChatColor\", \"{FFFF00}\"); dini_Set(\"ChatColor.ini\", pName(playerid), \"{FFFF00}\"); } if(listitem == 7) { SetPVarString(playerid, \"ChatColor\", \"{FF9933}\"); dini_Set(\"ChatColor.ini\", pName(playerid), \"{FF9933}\"); } if(listitem == { SetPVarString(playerid, \"ChatColor\", \"{CECECE}\"); dini_Set(\"ChatColor.ini\", pName(playerid), \"{CECECE}\"); } if(listitem == 9) { SetPVarString(playerid, \"ChatColor\", \"{ea00ff}\"); dini_Set(\"ChatColor.ini\", pName(playerid), \"{ea00ff}\"); }}return 1;}CMD:cmds(playerid){ ShowPlayerDialog(playerid, Dialog_parancsok, DIALOG_STYLE_LIST, \"{CDF917}Teszt Szeró Parancsok:\", \"{ffffff}Felhasználói Parancsok:\\n{33CCFF}Széf Parancsok:\\n\", \"Választ\", \"Bezár\"); return 1;}