I maked this dialog response : if(dialogid == 761)
{
if(response)
{
if ( listitem == 0)
{
new State;
State = GetPlayerState(playerid);
if(DMZone[playerid] == 1) return SendClientMessage(playerid,COLOR_RED, "ERROR: You can't use this command in DM!");
if(IsPlayerInAnyVehicle(playerid))
{
if(State == PLAYER_STATE_DRIVER)
{
new vehicleid;
vehicleid = GetPlayerVehicleID(playerid);
LinkVehicleToInterior(vehicleid, 0);
RemovePlayerFromVehicle(playerid);
SetVehiclePos(vehicleid, 2099.0176, -1806.1030, 13.5551);
}
}
SetPlayerInterior(playerid, 0);
SetPlayerPos(playerid, -2663.3313, 600.9813, 14.4531);
SetPlayerFacingAngle(playerid,92.4209);
new amb = CreateVehicle(416,-2663.3313, 600.9813, 14.4531,92.4209,-1,-1,600);
PutPlayerInVehicle(playerid, amb, 0);
Medic[playerid] = 1;
new name[MAX_PLAYER_NAME], string[48];
GetPlayerName(playerid, name, sizeof(name));
format(string, sizeof(string), "* %s is now a Medic.", name );
SendClientMessageToAll(COLOR_YELLOW, string);
SetPlayerCheckpoint(playerid,-2417.5559,2439.9246,12.6823,10);
SendClientMessage(playerid,COLOR_YELLOW,"* Follow the red markers and you'll recieve money!");
return 1;
}
}
if(dialogid == 761)
{
if(response)
{
if ( listitem == 0)
{
new State;
State = GetPlayerState(playerid);
if(DMZone[playerid] == 1) return SendClientMessage(playerid,COLOR_RED, "ERROR: You can't use this command in DM!");
if(IsPlayerInAnyVehicle(playerid))
{
if(State == PLAYER_STATE_DRIVER)
{
new vehicleid;
vehicleid = GetPlayerVehicleID(playerid);
LinkVehicleToInterior(vehicleid, 0);
RemovePlayerFromVehicle(playerid);
SetVehiclePos(vehicleid, 2099.0176, -1806.1030, 13.5551);
}
}
SetPlayerInterior(playerid, 0);
SetPlayerPos(playerid, -2663.3313, 600.9813, 14.4531);
SetPlayerFacingAngle(playerid,92.4209);
new amb = CreateVehicle(416,-2663.3313, 600.9813, 14.4531,92.4209,-1,-1,600);
PutPlayerInVehicle(playerid, amb, 0);
Medic[playerid] = 1;
new name[MAX_PLAYER_NAME], string[48];
GetPlayerName(playerid, name, sizeof(name));
format(string, sizeof(string), "* %s is now a Medic.", name );
SendClientMessageToAll(COLOR_YELLOW, string);
SetPlayerCheckpoint(playerid,-2417.5559,2439.9246,12.6823,10);
SendClientMessage(playerid,COLOR_YELLOW,"* Follow the red markers and you'll recieve money!");
return 1;
}
}
}
The dialog response doesn't work !
ShowPlayerDialog(playerid,761,DIALOG_STYLE_LIST, ""W"\t\t\tJobs",BigString15,"Close", "");
|
Код:
ShowPlayerDialog(playerid,761,DIALOG_STYLE_LIST, ""W"\t\t\tJobs",BigString15,"Close", ""); ![]() |
dcmd_jobs(playerid,params[]) {
#pragma unused params
new BigString15[1900];
strcat(BigString15, ""R"Medic Job\n", 1900 );
strcat(BigString15, ""L"Fermier Job!\n", 1900 );
strcat(BigString15, ""V"PizzaBoy Job\n", 1900 );
ShowPlayerDialog(playerid,761,DIALOG_STYLE_LIST, "W\t\t\tJobs",BigString15,"Close", "");
return 1;
}