14.12.2014, 15:05
Quote:
Deathmatchon[playerid] = false;
do it EDIT: sorry change pawn Код:
pawn Код:
pawn Код:
|
Edit it to your needs. It won't work as how it is. Edit the pickup's coordinates.
pawn Код:
#include <streamer>
new bool:gDeathMatchState = false,
gDeathMatch;
#define DIALOG_DEATHMATCH 0
#define DIALOG_LSDM 1
#define DIALOG_LVDM 2
#define DIALOG_SFDM 3
public OnGameModeInit()
{
gDeathMatch = CreateDynamicPickup(19193, 1, 0.0, 0.0, 0.0, -1, -1, -1, 100.0);
return 1;
}
public OnPlayerPickUpDynamicPickup(playerid, pickupid)
{
if(pickupid == gDeathMatch)
{
if(gDeathMatchState == true) return SendClientMessage(playerid, -1, "There is already a death match on!");
else if(gDeathMatchState == false) return ShowPlayerDialog(playerid, DIALOG_DEATHMATCH, DIALOG_STYLE_LIST, "DeathMatch list", "LS carpark DM\nLV warehouse DM\nSF tennis courts" , "Yes", "No");
}
return 1;
}
public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
{
siwtch(dialogid)
{
case DIALOG_DEATHMATCH:
{
if(!response) return 1;
else if(response)
{
switch(listitem)
{
case 0: ShowPlayerDialog(playerid, DIALOG_LSDM, DIALOG_STYLE_MSGBOX, "LS carpark DM", "You have chosen LS carpark DM, do you want to start the death match?", "Yes", "No");
case 1: ShowPlayerDialog(playerid, DIALOG_LVDM, DIALOG_STYLE_MSGBOX, "LV warehouse DM", "You have chosen LV warehouse DM, do you want to start the death match?", "Yes", "No");
case 2: ShowPlayerDialog(playerid, DIALOG_SFDM, DIALOG_STYLE_MSGBOX, "SF tennis courts DM", "You have chosen SF tennis courts DM, do you want to start the death match?", "Yes", "No");
}
}
}
case DIALOG_LSDM:
{
if(!response) return 1;
else if(response)
{
gDeathMatchState = true;
SetPlayerPos(playerid, 2798.2031,-1465.9199,24.1875);
GivePlayerWeapon(playerid, 28, 999999);
SetPlayerHealth(playerid, 100);
}
}
case DIALOG_LVDM:
{
if(!response) return 1;
else if(response)
{
gDeathMatchState = true;
SetPlayerPos(playerid, 1061.1685,2080.8584,10.8203);
GivePlayerWeapon(playerid, 24, 999999);
SetPlayerHealth(playerid, 100);
}
}
case DIALOG_SFDM:
{
if(!response) return 1;
else if(response)
{
gDeathMatchState = true;
SetPlayerPos(playerid, -2787.9775,-268.9075,7.1875);
GivePlayerWeapon(playerid, 26, 999999);
SetPlayerHealth(playerid, 100);
}
}
}
return 1;
}