public OnPlayerCommandText(playerid, cmdtext[]){ if(!strcmp(\"/dteszt\",cmdtext,true)){ new PlayerName[24]; GetPlayerName(playerid, PlayerName, sizeof(PlayerName)); if(strcmp(PlayerName,\"Deew\",true))//ide írod a nevet{SendClientMessage(playerid,0xff0000AA,\"Ezt a parancsot csak Deew használhatja!\"); //ide hogy mit tegyen ha nem az a neve}else{ ShowPlayerDialog(playerid, 5111, DIALOG_STYLE_LIST, \"Teszt\",\"Teszt1\\nTeszt2\",\"Kiválaszt\",\"Mégse\");}}return 0;}public OnDialogResponse (playerid, dialogid, response, listitem, inputtext []){ if(dialogid == 5111){if(response){ if(listitem == 0) { SetPlayerPos(playerid, 1535.5732,-1675.6609,13.3828); } if(listitem == 1) { SetPlayerPos(playerid, 1729.6116,-1855.1116,13.4141); return 1; }}} return 0;}
public OnDialogResponse (playerid, dialogid, response, listitem, inputtext []){ if(dialogid == 5111){if(response == 1){switch(listitem){ case 0: { SetPlayerPos(playerid, 1535.5732,-1675.6609,13.3828); } case 1: { SetPlayerPos(playerid, 1729.6116,-1855.1116,13.4141); }}}} return 0;}
#include <a_samp>public OnFilterScriptInit(){return 1;}public OnFilterScriptExit(){return 1;}public OnPlayerCommandText(playerid, cmdtext[]){ if(!strcmp(\"/dteszt\",cmdtext,true)){ new PlayerName[24]; GetPlayerName(playerid, PlayerName, sizeof(PlayerName)); if(strcmp(PlayerName,\"Deew\",true))//ide írod a nevet{SendClientMessage(playerid,0xff0000AA,\"Ezt a parancsot csak Deew használhatja!\"); //ide hogy mit tegyen ha nem az a neve}else{ ShowPlayerDialog(playerid, 5111, DIALOG_STYLE_LIST, \"Teszt\",\"Teszt1\\nTeszt2\",\"Kiválaszt\",\"Mégse\");}}return 0;}public OnDialogResponse (playerid, dialogid, response, listitem, inputtext []){ if(dialogid == 5111){switch(listitem){ case 0: { SetPlayerPos(playerid, 1535.5732,-1675.6609,13.3828); } case 1: { SetPlayerPos(playerid, 1729.6116,-1855.1116,13.4141); }}} return 0;}
Jónak kell lennie. public OnDialogResponse (playerid, dialogid, response, listitem, inputtext []){ if(dialogid == 5111){if(response == 1){switch(listitem){ case 0: { SetPlayerPos(playerid, 1535.5732,-1675.6609,13.3828); } case 1: { SetPlayerPos(playerid, 1729.6116,-1855.1116,13.4141); }}}} return 0;}
Az nem lehet, hogy az 5111-es Dialogod id-d már van? Próbáld átírni azt, mondjuk 5222-re, és úgy az összes többit.
public OnDialogResponse (playerid, dialogid, response, listitem, inputtext []){ if(dialogid == 5111) { if(response) { switch(listitem) { case 0:{ SetPlayerPos(playerid, 1535.5732,-1675.6609,13.3828); }case 1:{ SetPlayerPos(playerid, 1729.6116,-1855.1116,13.4141); } } } return 1; } return 0;}
Próbáld így, hátha jó: if(dialogid == 8898){if(response){ if(listitem == 0) {SetPlayerPos(playerid, 1535.5732,-1675.6609,13.3828);}if(listitem == 1){SetPlayerPos(playerid, 1729.6116,-1855.1116,13.4141);}} Ha nemjó, akkor bocs + ha sor hiba van akkor is bocs + ha egy }-el kevesebb akkor is bocs
if(dialogid == 8898){if(response){ if(listitem == 0) {SetPlayerPos(playerid, 1535.5732,-1675.6609,13.3828);}if(listitem == 1){SetPlayerPos(playerid, 1729.6116,-1855.1116,13.4141);}}