Hospital Medica [+REP]
#1

Hello can to help mee with this error
PHP код:
        case BUS_TYPE_MEDICAL:
        {
            if (
GetPlayerState(playerid) == PLAYER_STATE_ONFOOT)
            {
            
ShowTextDrawMenu(playeridTD_MENU_HOSPITAL,"~g~Hospital"1513);
            
ShowTextDrawMenuItems(playerid0" "" "" ",0);
            if (
PlayerInfo[playerid][pHealthInsurance] == 0)
            {
            
format(stringsizeof(string), "~g~$%d",HEAL_PRICE);
            
ShowTextDrawMenuItems(playerid1" ""~y~1 ~w~- Heal"string,HEAL_PRICE);
            }else{
            
format(stringsizeof(string), "~g~Free");
            
ShowTextDrawMenuItems(playerid1" ""~y~1 ~w~- Heal"string,0);
            }
            
            if (
PlayerInfo[playerid][pHealthInsurance] == 0)
            {
            
format(stringsizeof(string), "~g~$%d",CURE_PRICE);
            
ShowTextDrawMenuItems(playerid2" ""~y~2 ~w~- Cure"string,CURE_PRICE);
            }else{
            
format(stringsizeof(string), "~g~Free");
            
ShowTextDrawMenuItems(playerid2" ""~y~2 ~w~- Cure"string,0);
            }
            if (
PlayerInfo[playerid][pHealthInsurance] == 0)
            {
            
format(stringsizeof(string), "~g~$%d",HEAL_CURE_PRICE);
            
ShowTextDrawMenuItems(playerid3" ""~y~3 ~w~- Heal and Cure"string,HEAL_CURE_PRICE);
            }else{
            
format(stringsizeof(string), "~g~Free");
            
ShowTextDrawMenuItems(playerid3" ""~y~3 ~w~- Heal and Cure"string,0);
            }
            
            
format(stringsizeof(string), "~g~$%d",CANE_PRICE);
            
ShowTextDrawMenuItems(playerid4" ""~y~4 ~w~- Cane"string,CANE_PRICE);
            
format(stringsizeof(string), "~g~$%d",MORPHINE_PRICE);
            
ShowTextDrawMenuItems(playerid5" ""~y~5 ~w~- 25 grams Morphine"string,MORPHINE_PRICE);
            
format(stringsizeof(string), "~g~$%d",FLOWER_PRICE);
            
ShowTextDrawMenuItems(playerid6" ""~y~6 ~w~- Flowers"string,FLOWER_PRICE);
            if (
PlayerInfo[playerid][pHealthInsurance] == 0)
            {
            
format(stringsizeof(string), "~g~$%d",CONDOM_PRICE);
            
ShowTextDrawMenuItems(playerid7" ""~y~7 ~w~- Condom"string ,CONDOM_PRICE);
            }else{
            
format(stringsizeof(string), "~g~Free");
            
ShowTextDrawMenuItems(playerid7" ""~y~7 ~w~- Condom"string ,0);
            }
            
            if (
PlayerInfo[playerid][pHealthInsurance] == 0)
            {
            
format(stringsizeof(string), "~g~$%d",FIVE_CONDOM_PRICE);
            
ShowTextDrawMenuItems(playerid8" ""~y~8 ~w~- 5 Condom Value Pack"string ,FIVE_CONDOM_PRICE);
            }else{
            
format(stringsizeof(string), "~g~Free");
            
ShowTextDrawMenuItems(playerid8" ""~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(stringsizeof(string), "~g~$%d",CHLAMYDIA_PRICE);
            
ShowTextDrawMenuItems(playerid9" ""~y~9 ~w~- Chlamydia"string ,CHLAMYDIA_PRICE);
            
format(stringsizeof(string), "~g~$%d",SYPHILIS_PRICE);
            
ShowTextDrawMenuItems(playerid10" ""~y~10 ~w~- Syphilis"string ,SYPHILIS_PRICE);
            
format(stringsizeof(string), "~g~$%d",GONORRHEA_PRICE);
            
ShowTextDrawMenuItems(playerid11" ""~y~11 ~w~- Gonorrhea"string ,GONORRHEA_PRICE);
            
format(stringsizeof(string), "~g~$%d",HIV_PRICE);
            
ShowTextDrawMenuItems(playerid12" ""~y~12 ~w~- H.I.V"string ,HIV_PRICE);
            
format(stringsizeof(string), "~g~$%d",CHASTITY_BELT_PRICE);
            
ShowTextDrawMenuItems(playerid13" ""~y~13 ~w~- Chastity Belt"string ,CHASTITY_BELT_PRICE);
            
format(stringsizeof(string), "~g~$%d",SKIN_CHANGE_PRICE);
            
ShowTextDrawMenuItems(playerid14" ""~y~14 ~w~- Skin Change"string ,SKIN_CHANGE_PRICE);
            }
        } 
PHP код:
        //----------------------------------------------------------------------
        
case TD_MENU_HOSPITAL:
        {
        if (
Option != -1)
        {
        if (
Option >= && 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(playeridCOLOR_SERVER_HELP_MSG"Received a Heal from Health Insurance.  Thank You For Shopping at the Hospital.");
            }
            case 
2:
            {
            
ItemName "A Cure";
            
            for(new 
05s++)
            {
                if (
PlayerInfo[playerid][pStd][s] > 0)
                {
                    
stdcount ++;
                    
format(stringsizeof(string), "%s",Diseases[PlayerInfo[playerid][pStd][s]]);
                    
strmid(std[stdcount], string0128128);
                }
            }
            if (
stdcount 0)
            {
                switch (
stdcount)
                {
                    case 
1:format(stringsizeof(string), "%s",std[1]);
                    case 
2:format(stringsizeof(string), "%s And %s",std[1],std[2]);
                    case 
3:format(stringsizeof(string), "%s, %s And %s",std[1],std[2],std[3]);
                    case 
4:format(stringsizeof(string), "%s, %s, %s And %s",std[1],std[2],std[3],std[4]);
                }
            }else{
            return 
SendClientMessage(playeridCOLOR_ERROR"You Are Not Infected With Any Diseases.");
            }
            
format(stringsizeof(string), "You Have Been Cured Of %s.",string);
            
SendClientMessage(playeridCOLOR_SERVER_HELP_MSGstring);
            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(playeridCOLOR_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 05s++)
            {
                if (
PlayerInfo[playerid][pStd][s] > 0)
                {
                    
stdcount ++;
                    
format(stringsizeof(string), "%s",Diseases[PlayerInfo[playerid][pStd][s]]);
                    
strmid(std[stdcount], string0128128);
                }
            }
            if (
stdcount 0)
            {
                switch (
stdcount)
                {
                    case 
1:format(stringsizeof(string), "%s",std[1]);
                    case 
2:format(stringsizeof(string), "%s And %s",std[1],std[2]);
                    case 
3:format(stringsizeof(string), "%s, %s And %s",std[1],std[2],std[3]);
                    case 
4:format(stringsizeof(string), "%s, %s, %s And %s",std[1],std[2],std[3],std[4]);
                }
            }else{
            return 
SendClientMessage(playeridCOLOR_ERROR"You Are Not Infected With Any Diseases.");
            }
            
format(stringsizeof(string), "You Have Been Cured Of %s.",string);
            
SendClientMessage(playeridCOLOR_SERVER_HELP_MSGstring);
            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(playeridCOLOR_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(playeridCOLOR_ERROR"Law Enforcement Agents Cannot Buy Drugs.");
            
ItemName "25 grams of Drugs";
            
            if (
PlayerInfo[playerid][pDrugs] + 25 MAX_DRUGS)
            {
            
format(stringsizeof(string), "You Are Carrying %d Grams Of Drugs And Cannot Carry Anymore. Max Drugs %d",PlayerInfo[playerid][pDrugs],MAX_DRUGS);
            
SendClientMessage(playerid,COLOR_ERRORstring);
            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(playeridCOLOR_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(playeridCOLOR_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(stringsizeof(string), "You Are Already Infected With %s",Diseases[PlayerInfo[playerid][pStd][1]]);
            
SendClientMessage(playeridCOLOR_ERRORstring);
            return 
1;
            }
            
            
ItemName "Chlamydia";
            
PlayerInfo[playerid][pStd][1] = 1;
            
format(stringsizeof(string), "%s (%d) Has Been Infected With %s",PlayerInfo[playerid][pName],playerid,Diseases[PlayerInfo[playerid][pStd][1]]);
            
SendClientMessageToAll(COLOR_SERVER_HELP_MSGstring);
            }
            case 
10:
            {
            
            if (
PlayerInfo[playerid][pStd][2] == 2)
            {
            
format(stringsizeof(string), "You Are Already Infected With %s",Diseases[PlayerInfo[playerid][pStd][2]]);
            
SendClientMessage(playeridCOLOR_ERRORstring);
            return 
1;
            }
            
ItemName "Syphilis";
            
PlayerInfo[playerid][pStd][2] = 2;
            
format(stringsizeof(string), "%s (%d) Has Been Infected With %s",PlayerInfo[playerid][pName],playerid,Diseases[PlayerInfo[playerid][pStd][2]]);
            
SendClientMessageToAll(COLOR_SERVER_HELP_MSGstring);
            }
            
            case 
11:
            {
            
            if (
PlayerInfo[playerid][pStd][3] == 3)
            {
            
format(stringsizeof(string), "You Are Already Infected With %s",Diseases[PlayerInfo[playerid][pStd][3]]);
            
SendClientMessage(playeridCOLOR_ERRORstring);
            return 
1;
            }
            
            
ItemName "Gonorrhea";
            
PlayerInfo[playerid][pStd][3] = 3;
            
format(stringsizeof(string), "%s (%d) Has Been Infected With %s",PlayerInfo[playerid][pName],playerid,Diseases[PlayerInfo[playerid][pStd][3]]);
            
SendClientMessageToAll(COLOR_SERVER_HELP_MSGstring);
            }
            
            case 
12:
            {
            
            if (
PlayerInfo[playerid][pStd][4] == 4)
            {
            
format(stringsizeof(string), "You Are Already Infected With %s",Diseases[PlayerInfo[playerid][pStd][4]]);
            
SendClientMessage(playeridCOLOR_ERRORstring);
            return 
1;
            }
            
ItemName "H.I.V";
            
            
PlayerInfo[playerid][pStd][4] = 4;
            
format(stringsizeof(string), "%s (%d) Has Been Infected With %s",PlayerInfo[playerid][pName],playerid,Diseases[PlayerInfo[playerid][pStd][4]]);
            
SendClientMessageToAll(COLOR_SERVER_HELP_MSGstring);
            }
            case 
13:
            {
            if(
PlayerInfo[playerid][pChastity] > 0)return SendClientMessage(playeridCOLOR_ERROR"Your Already Wearing A Chastity Belt.");
            
SendClientMessage(playeridCOLOR_SERVER_HELP_MSG"You Are Now Wearing A Chastity Belt.  You Cannot Engage In Any Sexual Activities.");
            
SendClientMessage(playeridCOLOR_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(playeridCOLOR_ERROR"Law Enforcement Agents Cannot Buy Drugs.");
            
SetPlayerHealth(playerid0.0);
            
ForceClassSelection(playerid);
            
format(stringsizeof(string), "Nuk Behet %s",Diseases[PlayerInfo[playerid][pStd][1]]);
            
SendClientMessage(playeridCOLOR_ERRORstring);
            }
            }
            
//HouseInfo[CP][h_Budget] += Menu_Item_Price[playerid][Option];
            
GivePlayerMoney(playeridMenu_Item_Price[playerid][Option]);
            
format(stringsizeof(string), "Purchased %s For $%d. Thankyou For Shopping At %s.",ItemName,Menu_Item_Price[playerid][Option],HouseInfo[CP][h_HouseIntName]);
            
SendClientMessage(playeridCOLOR_SERVER_HELP_MSGstring);
        }else{
        
SendClientMessage(playeridCOLOR_ERROR"You Cannot Afford To Buy That Item.");
        }
        }else{
        
SendClientMessage(playeridCOLOR_ERROR"Selection Cancelled.");
        
HideTextDrawMenu(playerid);
        }
        }else{
        
SendClientMessage(playeridCOLOR_ERROR"Selection Cancelled.");
        
HideTextDrawMenu(playerid);
        }
        }
        
//---------------------------------------------------------------------- 
I add just this
PHP код:
            case 14:
            {
            if (
PlayerInfo[playerid][pTeam] == TEAM_LAW || PlayerInfo[playerid][pVigilante] == 1)return SendClientMessage(playeridCOLOR_ERROR"Law Enforcement Agents Cannot Buy Drugs.");
            
SetPlayerHealth(playerid0.0);
            
ForceClassSelection(playerid);
            
format(stringsizeof(string), "Nuk Behet %s",Diseases[PlayerInfo[playerid][pStd][1]]);
            
SendClientMessage(playeridCOLOR_ERRORstring);
            } 
and this

PHP код:
            format(stringsizeof(string), "~g~$%d",SKIN_CHANGE_PRICE);
            
ShowTextDrawMenuItems(playerid14" ""~y~14 ~w~- Skin Change"string ,SKIN_CHANGE_PRICE); 
Idk dont have error just dont work when i go on hospital and press the skin change he said just
PHP код:
Selection Canceled
Reply
#2

Help mee please
Reply
#3

pawn Код:
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);
            }
This code won't change anything, It just force the player to return to Class selection.
Reply
#4

But he dont do it look it .
Reply
#5

is this cruel world cnr ??
Reply
#6

Quote:
Originally Posted by arlindi
Посмотреть сообщение
But he dont do it look it .
In the code you put above already have case 14, And you did add it again ?
Reply
#7

No But bro can to help mee Sasuke ? Cruel world is noob cnr
You have start a cnr and your cnr is the best But can to help mee bro with this ?
I cant fix it
Reply
#8

Noo look it i send oyu it and dont have
Reply
#9

well first tell me who u are .... You are x_man i saw all of your posts
Reply
#10

Now i am Iffet in cnr And in your server
Reply
#11

iffet ?? oh sorry i thought x_man i will try to help
Reply
#12

Yeah help mee with this Bro Sasuke

And 1 question can to give mee your skype name ?
Reply
#13

well AroseKhanNiazi add me i will help you when i wake up need to sleep its 3:30 am here
Reply
#14

Now can to help mee with this error i have here ?
Reply
#15

What is your picture ?
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)