#define DIALOG_4 400 // dialog
#include <a_samp>#include <zcmd>#define DIALOG_4 400CMD:tdm(playerid,params[]){SendClientMessage(playerid,0x9ACD32AA,\"Válassz csapatot!\");ShowPlayerDialog(playerid,DIALOG_4,DIALOG_STYLE_LIST,\"TeamDeathMatch\",\"Védekezõ(piros)\\nTámadó(kék)\",\"OK\",\"Kilép\");return 1;}public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[]){if(dialogid == DIALOG_4){ if(response == 1) { dmid[playerid] = 5; // Azonosítószám megadása FONTOS SpawnPlayer(playerid); // Játékos lespawnolása switch(listitem) { case 0: { SetPlayerPos(playerid,-1302.2087,2556.9065,86.9042); SetPlayerColor(playerid, 0xFF0000FF); GivePlayerWeapon(playerid,4,1); GivePlayerWeapon(playerid,24,190); GivePlayerWeapon(playerid,25,150); GivePlayerWeapon(playerid,30,600); GivePlayerWeapon(playerid,35,3); SetPlayerVirtualWorld(playerid, 3); } case 1: { SetPlayerPos(playerid,-1297.4124,2293.1162,130.7655); SetPlayerColor(playerid, 0x000080FF); GivePlayerWeapon(playerid,4,1); GivePlayerWeapon(playerid,24,190); GivePlayerWeapon(playerid,25,150); GivePlayerWeapon(playerid,30,600); GivePlayerWeapon(playerid,34,15); SetPlayerVirtualWorld(playerid, 3); } }}else{ SendClientMessage(playerid,0x00CC00,\"Kiléptél\");}}return 1;}
Ádám is így csinálta, de akkor tessék:[pawn]#include <a_samp>#include <zcmd>#define DIALOG_4 400CMD:tdm(playerid,params[]){SendClientMessage(playerid,0x9ACD32AA,\"Válassz csapatot!\");ShowPlayerDialog(playerid,DIALOG_4,DIALOG_STYLE_LIST,\"TeamDeathMatch\",\"Védekezõ(piros)\\nTámadó(kék)\",\"OK\",\"Kilép\");return 1;}public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[]){if(dialogid == DIALOG_4){ if(response == 1) { dmid[playerid] = 5; // Azonosítószám megadása FONTOS SpawnPlayer(playerid); // Játékos lespawnolása switch(listitem) { case 0: { SetPlayerPos(playerid,-1302.2087,2556.9065,86.9042); SetPlayerColor(playerid, 0xFF0000FF); GivePlayerWeapon(playerid,4,1); GivePlayerWeapon(playerid,24,190); GivePlayerWeapon(playerid,25,150); GivePlayerWeapon(playerid,30,600); GivePlayerWeapon(playerid,35,3); SetPlayerVirtualWorld(playerid, 3); } case 1: { SetPlayerPos(playerid,-1297.4124,2293.1162,130.7655); SetPlayerColor(playerid, 0x000080FF); GivePlayerWeapon(playerid,4,1); GivePlayerWeapon(playerid,24,190); GivePlayerWeapon(playerid,25,150); GivePlayerWeapon(playerid,30,600); GivePlayerWeapon(playerid,34,15); SetPlayerVirtualWorld(playerid, 3); } } } else { SendClientMessage(playerid,0x00CC00,\"Kiléptél\"); }}return 1;}[/pawn]