29.06.2014, 21:02
Hello can to help mee with this error
I add just this
and this
Idk dont have error just dont work when i go on hospital and press the skin change he said just
PHP код:
case BUS_TYPE_MEDICAL:
{
if (GetPlayerState(playerid) == PLAYER_STATE_ONFOOT)
{
ShowTextDrawMenu(playerid, TD_MENU_HOSPITAL,"~g~Hospital", 15, 13);
ShowTextDrawMenuItems(playerid, 0, " ", " ", " ",0);
if (PlayerInfo[playerid][pHealthInsurance] == 0)
{
format(string, sizeof(string), "~g~$%d",HEAL_PRICE);
ShowTextDrawMenuItems(playerid, 1, " ", "~y~1 ~w~- Heal", string,HEAL_PRICE);
}else{
format(string, sizeof(string), "~g~Free");
ShowTextDrawMenuItems(playerid, 1, " ", "~y~1 ~w~- Heal", string,0);
}
if (PlayerInfo[playerid][pHealthInsurance] == 0)
{
format(string, sizeof(string), "~g~$%d",CURE_PRICE);
ShowTextDrawMenuItems(playerid, 2, " ", "~y~2 ~w~- Cure", string,CURE_PRICE);
}else{
format(string, sizeof(string), "~g~Free");
ShowTextDrawMenuItems(playerid, 2, " ", "~y~2 ~w~- Cure", string,0);
}
if (PlayerInfo[playerid][pHealthInsurance] == 0)
{
format(string, sizeof(string), "~g~$%d",HEAL_CURE_PRICE);
ShowTextDrawMenuItems(playerid, 3, " ", "~y~3 ~w~- Heal and Cure", string,HEAL_CURE_PRICE);
}else{
format(string, sizeof(string), "~g~Free");
ShowTextDrawMenuItems(playerid, 3, " ", "~y~3 ~w~- Heal and Cure", string,0);
}
format(string, sizeof(string), "~g~$%d",CANE_PRICE);
ShowTextDrawMenuItems(playerid, 4, " ", "~y~4 ~w~- Cane", string,CANE_PRICE);
format(string, sizeof(string), "~g~$%d",MORPHINE_PRICE);
ShowTextDrawMenuItems(playerid, 5, " ", "~y~5 ~w~- 25 grams Morphine", string,MORPHINE_PRICE);
format(string, sizeof(string), "~g~$%d",FLOWER_PRICE);
ShowTextDrawMenuItems(playerid, 6, " ", "~y~6 ~w~- Flowers", string,FLOWER_PRICE);
if (PlayerInfo[playerid][pHealthInsurance] == 0)
{
format(string, sizeof(string), "~g~$%d",CONDOM_PRICE);
ShowTextDrawMenuItems(playerid, 7, " ", "~y~7 ~w~- Condom", string ,CONDOM_PRICE);
}else{
format(string, sizeof(string), "~g~Free");
ShowTextDrawMenuItems(playerid, 7, " ", "~y~7 ~w~- Condom", string ,0);
}
if (PlayerInfo[playerid][pHealthInsurance] == 0)
{
format(string, sizeof(string), "~g~$%d",FIVE_CONDOM_PRICE);
ShowTextDrawMenuItems(playerid, 8, " ", "~y~8 ~w~- 5 Condom Value Pack", string ,FIVE_CONDOM_PRICE);
}else{
format(string, sizeof(string), "~g~Free");
ShowTextDrawMenuItems(playerid, 8, " ", "~y~8 ~w~- 5 Condom Value Pack", string ,0);
}
/*format(string, sizeof(string), "~g~$%d",CHLAMYDIA_PRICE);
ShowTextDrawMenuItems(playerid, 9, " ", "~y~9 ~w~- Chlamydia", string ,CHLAMYDIA_PRICE);
format(string, sizeof(string), "~g~$%d",GONORRHEA_PRICE);
ShowTextDrawMenuItems(playerid, 10, " ", "~y~10 ~w~- Gonorrhea", string ,GONORRHEA_PRICE);
*/
format(string, sizeof(string), "~g~$%d",CHLAMYDIA_PRICE);
ShowTextDrawMenuItems(playerid, 9, " ", "~y~9 ~w~- Chlamydia", string ,CHLAMYDIA_PRICE);
format(string, sizeof(string), "~g~$%d",SYPHILIS_PRICE);
ShowTextDrawMenuItems(playerid, 10, " ", "~y~10 ~w~- Syphilis", string ,SYPHILIS_PRICE);
format(string, sizeof(string), "~g~$%d",GONORRHEA_PRICE);
ShowTextDrawMenuItems(playerid, 11, " ", "~y~11 ~w~- Gonorrhea", string ,GONORRHEA_PRICE);
format(string, sizeof(string), "~g~$%d",HIV_PRICE);
ShowTextDrawMenuItems(playerid, 12, " ", "~y~12 ~w~- H.I.V", string ,HIV_PRICE);
format(string, sizeof(string), "~g~$%d",CHASTITY_BELT_PRICE);
ShowTextDrawMenuItems(playerid, 13, " ", "~y~13 ~w~- Chastity Belt", string ,CHASTITY_BELT_PRICE);
format(string, sizeof(string), "~g~$%d",SKIN_CHANGE_PRICE);
ShowTextDrawMenuItems(playerid, 14, " ", "~y~14 ~w~- Skin Change", string ,SKIN_CHANGE_PRICE);
}
}
PHP код:
//----------------------------------------------------------------------
case TD_MENU_HOSPITAL:
{
if (Option != -1)
{
if (Option >= 1 && Option <= Menu_Options[playerid] )
{
if (GetPlayerMoney(playerid) >= Menu_Item_Price[playerid][Option])
{
HideTextDrawMenu(playerid);
switch (Option)
{
case 1:
{
ItemName = "A Heal";
SetPlayerHealth(playerid,99);
if (PlayerInfo[playerid][pHealthInsurance] > 0)return SendClientMessage(playerid, COLOR_SERVER_HELP_MSG, "Received a Heal from Health Insurance. Thank You For Shopping at the Hospital.");
}
case 2:
{
ItemName = "A Cure";
for(new s = 0; s < 5; s++)
{
if (PlayerInfo[playerid][pStd][s] > 0)
{
stdcount ++;
format(string, sizeof(string), "%s",Diseases[PlayerInfo[playerid][pStd][s]]);
strmid(std[stdcount], string, 0, 128, 128);
}
}
if (stdcount > 0)
{
switch (stdcount)
{
case 1:format(string, sizeof(string), "%s",std[1]);
case 2:format(string, sizeof(string), "%s And %s",std[1],std[2]);
case 3:format(string, sizeof(string), "%s, %s And %s",std[1],std[2],std[3]);
case 4:format(string, sizeof(string), "%s, %s, %s And %s",std[1],std[2],std[3],std[4]);
}
}else{
return SendClientMessage(playerid, COLOR_ERROR, "You Are Not Infected With Any Diseases.");
}
format(string, sizeof(string), "You Have Been Cured Of %s.",string);
SendClientMessage(playerid, COLOR_SERVER_HELP_MSG, string);
if (PlayerInfo[playerid][pCustomDeath] == WEAPON_STD)PlayerInfo[playerid][pCustomDeath] = 0;
PlayerInfo[playerid][pStd][1] = 0;
PlayerInfo[playerid][pStd][2] = 0;
PlayerInfo[playerid][pStd][3] = 0;
PlayerInfo[playerid][pStd][4] = 0;
if (PlayerInfo[playerid][pHealthInsurance] > 0)return SendClientMessage(playerid, COLOR_SERVER_HELP_MSG, "Received a Cure from Health Insurance. Thank You For Shopping at the Hospital.");
}
case 3:
{
ItemName = "A Heal And Cure";
SetPlayerHealth(playerid,99);
//new stdcount = 0,std[5][128];
for(new s = 0; s < 5; s++)
{
if (PlayerInfo[playerid][pStd][s] > 0)
{
stdcount ++;
format(string, sizeof(string), "%s",Diseases[PlayerInfo[playerid][pStd][s]]);
strmid(std[stdcount], string, 0, 128, 128);
}
}
if (stdcount > 0)
{
switch (stdcount)
{
case 1:format(string, sizeof(string), "%s",std[1]);
case 2:format(string, sizeof(string), "%s And %s",std[1],std[2]);
case 3:format(string, sizeof(string), "%s, %s And %s",std[1],std[2],std[3]);
case 4:format(string, sizeof(string), "%s, %s, %s And %s",std[1],std[2],std[3],std[4]);
}
}else{
return SendClientMessage(playerid, COLOR_ERROR, "You Are Not Infected With Any Diseases.");
}
format(string, sizeof(string), "You Have Been Cured Of %s.",string);
SendClientMessage(playerid, COLOR_SERVER_HELP_MSG, string);
if (PlayerInfo[playerid][pCustomDeath] == WEAPON_STD)PlayerInfo[playerid][pCustomDeath] = 0;
PlayerInfo[playerid][pStd][1] = 0;
PlayerInfo[playerid][pStd][2] = 0;
PlayerInfo[playerid][pStd][3] = 0;
PlayerInfo[playerid][pStd][4] = 0;
if (PlayerInfo[playerid][pHealthInsurance] > 0)return SendClientMessage(playerid, COLOR_SERVER_HELP_MSG, "Received a Heal And Cure from Health Insurance. Thank You For Shopping at the Hospital.");
}
case 4:
{
ItemName = "A Cane";
SetPlayerWeapon(playerid,15,1);
}
case 5:
{
if (PlayerInfo[playerid][pTeam] == TEAM_LAW || PlayerInfo[playerid][pVigilante] == 1)return SendClientMessage(playerid, COLOR_ERROR, "Law Enforcement Agents Cannot Buy Drugs.");
ItemName = "25 grams of Drugs";
if (PlayerInfo[playerid][pDrugs] + 25 > MAX_DRUGS)
{
format(string, sizeof(string), "You Are Carrying %d Grams Of Drugs And Cannot Carry Anymore. Max Drugs %d",PlayerInfo[playerid][pDrugs],MAX_DRUGS);
SendClientMessage(playerid,COLOR_ERROR, string);
return 1;
}
PlayerInfo[playerid][pDrugs] += 25;
}
case 6:
{
ItemName = "Flowers";
SetPlayerWeapon(playerid,14,1);
}
case 7:
{
ItemName = "A Condom";
PlayerInfo[playerid][pCondom] += 1;
if (PlayerInfo[playerid][pHealthInsurance] > 0)return SendClientMessage(playerid, COLOR_SERVER_HELP_MSG, "Received 1 Condom from Health Insurance. Thank You For Shopping at the Hospital.");
}
case 8:
{
ItemName = "A 5 Condom Value Pack";
PlayerInfo[playerid][pCondom] += 5;
if (PlayerInfo[playerid][pHealthInsurance] > 0)return SendClientMessage(playerid, COLOR_SERVER_HELP_MSG, "Received a 5 Condom Value Pack from Health Insurance. Thank You For Shopping at the Hospital.");
}
case 9:
{
if (PlayerInfo[playerid][pStd][1] == 1)
{
format(string, sizeof(string), "You Are Already Infected With %s",Diseases[PlayerInfo[playerid][pStd][1]]);
SendClientMessage(playerid, COLOR_ERROR, string);
return 1;
}
ItemName = "Chlamydia";
PlayerInfo[playerid][pStd][1] = 1;
format(string, sizeof(string), "%s (%d) Has Been Infected With %s",PlayerInfo[playerid][pName],playerid,Diseases[PlayerInfo[playerid][pStd][1]]);
SendClientMessageToAll(COLOR_SERVER_HELP_MSG, string);
}
case 10:
{
if (PlayerInfo[playerid][pStd][2] == 2)
{
format(string, sizeof(string), "You Are Already Infected With %s",Diseases[PlayerInfo[playerid][pStd][2]]);
SendClientMessage(playerid, COLOR_ERROR, string);
return 1;
}
ItemName = "Syphilis";
PlayerInfo[playerid][pStd][2] = 2;
format(string, sizeof(string), "%s (%d) Has Been Infected With %s",PlayerInfo[playerid][pName],playerid,Diseases[PlayerInfo[playerid][pStd][2]]);
SendClientMessageToAll(COLOR_SERVER_HELP_MSG, string);
}
case 11:
{
if (PlayerInfo[playerid][pStd][3] == 3)
{
format(string, sizeof(string), "You Are Already Infected With %s",Diseases[PlayerInfo[playerid][pStd][3]]);
SendClientMessage(playerid, COLOR_ERROR, string);
return 1;
}
ItemName = "Gonorrhea";
PlayerInfo[playerid][pStd][3] = 3;
format(string, sizeof(string), "%s (%d) Has Been Infected With %s",PlayerInfo[playerid][pName],playerid,Diseases[PlayerInfo[playerid][pStd][3]]);
SendClientMessageToAll(COLOR_SERVER_HELP_MSG, string);
}
case 12:
{
if (PlayerInfo[playerid][pStd][4] == 4)
{
format(string, sizeof(string), "You Are Already Infected With %s",Diseases[PlayerInfo[playerid][pStd][4]]);
SendClientMessage(playerid, COLOR_ERROR, string);
return 1;
}
ItemName = "H.I.V";
PlayerInfo[playerid][pStd][4] = 4;
format(string, sizeof(string), "%s (%d) Has Been Infected With %s",PlayerInfo[playerid][pName],playerid,Diseases[PlayerInfo[playerid][pStd][4]]);
SendClientMessageToAll(COLOR_SERVER_HELP_MSG, string);
}
case 13:
{
if(PlayerInfo[playerid][pChastity] > 0)return SendClientMessage(playerid, COLOR_ERROR, "Your Already Wearing A Chastity Belt.");
SendClientMessage(playerid, COLOR_SERVER_HELP_MSG, "You Are Now Wearing A Chastity Belt. You Cannot Engage In Any Sexual Activities.");
SendClientMessage(playerid, COLOR_SERVER_MAIN_MSG, "Type {D6D631}/belt {FFFFFF}to Remove and Discard Your Chastity Belt.");
ItemName = "A Chastity Belt";
PlayerInfo[playerid][pChastity] = 1;
}
case 14:
{
if (PlayerInfo[playerid][pTeam] == TEAM_LAW || PlayerInfo[playerid][pVigilante] == 1)return SendClientMessage(playerid, COLOR_ERROR, "Law Enforcement Agents Cannot Buy Drugs.");
SetPlayerHealth(playerid, 0.0);
ForceClassSelection(playerid);
format(string, sizeof(string), "Nuk Behet %s",Diseases[PlayerInfo[playerid][pStd][1]]);
SendClientMessage(playerid, COLOR_ERROR, string);
}
}
//HouseInfo[CP][h_Budget] += Menu_Item_Price[playerid][Option];
GivePlayerMoney(playerid, 0 - Menu_Item_Price[playerid][Option]);
format(string, sizeof(string), "Purchased %s For $%d. Thankyou For Shopping At %s.",ItemName,Menu_Item_Price[playerid][Option],HouseInfo[CP][h_HouseIntName]);
SendClientMessage(playerid, COLOR_SERVER_HELP_MSG, string);
}else{
SendClientMessage(playerid, COLOR_ERROR, "You Cannot Afford To Buy That Item.");
}
}else{
SendClientMessage(playerid, COLOR_ERROR, "Selection Cancelled.");
HideTextDrawMenu(playerid);
}
}else{
SendClientMessage(playerid, COLOR_ERROR, "Selection Cancelled.");
HideTextDrawMenu(playerid);
}
}
//----------------------------------------------------------------------
PHP код:
case 14:
{
if (PlayerInfo[playerid][pTeam] == TEAM_LAW || PlayerInfo[playerid][pVigilante] == 1)return SendClientMessage(playerid, COLOR_ERROR, "Law Enforcement Agents Cannot Buy Drugs.");
SetPlayerHealth(playerid, 0.0);
ForceClassSelection(playerid);
format(string, sizeof(string), "Nuk Behet %s",Diseases[PlayerInfo[playerid][pStd][1]]);
SendClientMessage(playerid, COLOR_ERROR, string);
}
PHP код:
format(string, sizeof(string), "~g~$%d",SKIN_CHANGE_PRICE);
ShowTextDrawMenuItems(playerid, 14, " ", "~y~14 ~w~- Skin Change", string ,SKIN_CHANGE_PRICE);
PHP код:
Selection Canceled.