#define TEAM_ROBBERS 1 #define TEAM_COPS 2 new CnR[MAX_PLAYERS]; CMD:cnr(playerid, params[]) { ShowPlayerDialog(playerid, DIALOG_CNR, DIALOG_STYLE_LIST, "Minigames", "{CC6600}Team Robbers\n{0000FF}Team Police", "Choose", "Exit"); return 1; } public OnDialogResponse(dialogid) { if(dialogid == DIALOG_CNR) { if(response) { switch(listitem) { case 0: { SetPlayerTeam(playerid, TEAM_ROBBERS); ResetPlayerWeapons(playerid); GameTextForPlayer(playerid, "You have joined ~r~~h~Robbers Team", 5000, 2 ); SetPlayerPos( playerid , 1459.7563, 2773.3923, 10.7790 ); GivePlayerWeapon(playerid, 5, 1); GivePlayerWeapon(playerid, 24, 999); GivePlayerWeapon(playerid, 27, 999); GivePlayerWeapon(playerid, 32, 999); GivePlayerWeapon(playerid, 31, 999); SetPlayerSkin( playerid , 293 ); SetPlayerColor( playerid , 0xFF0000FF ); } case 1: { SetPlayerTeam(playerid, TEAM_COPS); ResetPlayerWeapons(playerid); GameTextForPlayer(playerid, "You have joined ~b~~h~Cops Team", 5000, 2 ); SetPlayerPos( playerid , 2290.1704, 2428.5388, 10.8666 ); SetPlayerSkin( playerid , 280 ); SetPlayerColor( playerid , 0x33CCFFAA ); // light_blue GivePlayerWeapon(playerid, 5, 1); GivePlayerWeapon(playerid, 24, 999); GivePlayerWeapon(playerid, 27, 999); GivePlayerWeapon(playerid, 32, 999); GivePlayerWeapon(playerid, 31, 999); ResetPlayerWeapons( playerid ); CnR[playerid] = 1; } } } }
public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
public OnDialogResponse(dialogid)
public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[]) |
public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
{
if(dialogid == DIALOG_CNR)
{
if(response)
{
switch(listitem)
{
case 0:
{
SetPlayerTeam(playerid, TEAM_ROBBERS);
ResetPlayerWeapons(playerid);
GameTextForPlayer(playerid, "You have joined ~r~~h~Robbers Team", 5000, 2 );
SetPlayerPos( playerid , 1459.7563, 2773.3923, 10.7790 );
GivePlayerWeapon(playerid, 5, 1);
GivePlayerWeapon(playerid, 24, 999);
GivePlayerWeapon(playerid, 27, 999);
GivePlayerWeapon(playerid, 32, 999);
GivePlayerWeapon(playerid, 31, 999);
SetPlayerSkin( playerid , 293 );
SetPlayerColor( playerid , 0xFF0000FF );
}
case 1:
{
SetPlayerTeam(playerid, TEAM_COPS);
ResetPlayerWeapons(playerid);
GameTextForPlayer(playerid, "You have joined ~b~~h~Cops Team", 5000, 2 );
SetPlayerPos( playerid , 2290.1704, 2428.5388, 10.8666 );
SetPlayerSkin( playerid , 280 );
SetPlayerColor( playerid , 0x33CCFFAA ); // light_blue
GivePlayerWeapon(playerid, 5, 1);
GivePlayerWeapon(playerid, 24, 999);
GivePlayerWeapon(playerid, 27, 999);
GivePlayerWeapon(playerid, 32, 999);
GivePlayerWeapon(playerid, 31, 999);
ResetPlayerWeapons( playerid );
CnR[playerid] = 1;
}
}
}