#define TDM 1 new Tdm_A[MAX_PLAYERS]; new Tdm_B[MAX_PLAYERS]; |
The Command : if(strcmp(cmdtext, "/Tdm" , true ) == 0 ) { SetPlayerVirtualWorld(playerid, 1); SendClientMessage(playerid, COLOR_RED, "Welcome - бшелйн дбайн майжеш дийн гйаиоиах', ъдре."); ShowPlayerDialog(playerid, TDM, DIALOG_STYLE_LIST, "TeamDeathMatch", "{F30000AA}Red Team\n{0062F6AA}BlueTeam", "айщеш", "бйием"); return 1; } |
OnPlayerSpawn , The Corectly Settings. if(Tdm_A[playerid] == 1) { ResetPlayerWeapons(playerid); GivePlayerWeapon(playerid, 24, 10000); GivePlayerWeapon(playerid, 27, 10000); GivePlayerWeapon(playerid, 27, 10000); GivePlayerWeapon(playerid, 31, 10000); GivePlayerWeapon(playerid, 34, 10000); SetPlayerColor(playerid, 0xF30000AA); SetPlayerSkin(playerid, 266); SetPlayerSkin(playerid, 267); SetPlayerPos(playerid, -2127.1545,-81.3511,35.3203); return 1; } if(Tdm_B[playerid] == 1) { ResetPlayerWeapons(playerid); GivePlayerWeapon(playerid, 24, 10000); GivePlayerWeapon(playerid, 27, 10000); GivePlayerWeapon(playerid, 27, 10000); GivePlayerWeapon(playerid, 31, 10000); GivePlayerWeapon(playerid, 34, 10000); SetPlayerColor(playerid, 0x0062F6AA); SetPlayerSkin(playerid, 230); SetPlayerPos(playerid, -2124.8909,-263.9922,35.3203); return 1; } |
OnDialogResponse. public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[]) { if(dialogid == TDM) { switch(listitem) { case 0: { SendClientMessage(playerid,0xFF0000FF,"бзшъ бчбецд дагеод"); Tdm_A[playerid] = 1; Tdm_B[playerid] = 0; SpawnPlayer(playerid); } case 1: { SendClientMessage(playerid,0x0099FFFF,"бзшъ бчбецд длземд"); Tdm_A[playerid] = 0; Tdm_B[playerid] = 1; SpawnPlayer(playerid); } } if(!response)return SendClientMessage(playerid,0xFF9900FF,"бзшъ мцаъ одгйамев"); } return 1; } |