Working on that problem for 2 days please help !
#1

Код:
public OnPlayerEnterCheckpoint(playerid)
{

    new string[256];

    //if(PlayerInfo[playerid][pMission] <= MISSION_TYPE_CASINO_HOLDUP)
    //{

    new Houseid = PlayerInfo[playerid][pCheckpoint];


    switch (HouseInfo[Houseid][h_cpbustype])
    {

        case BUS_TYPE_SEXSHOP:
        {
        if (GetPlayerState(playerid) == PLAYER_STATE_ONFOOT)
        {
        	ShowPlayerDialog(playerid, DIALOG_SEXSHOP, DIALOG_STYLE_LIST, "Menu", "Dildo\nCondom", "Buy", "Cancel");
        }
        }
    }
    return 1;
}
(27712) : error 029: invalid expression, assumed zero
(27712) : warning 215: expression has no effect
(27712) : error 001: expected token: ";", but found ")"
(27712) : error 029: invalid expression, assumed zero


Please someone solve that problem
Reply
#2

What line is 27712?
Reply
#3

Quote:
Originally Posted by Jack_Leslie
Посмотреть сообщение
What line is 27712?
Here;

Код:
        	ShowPlayerDialog(playerid, DIALOG_SEXSHOP, DIALOG_STYLE_LIST, "Menu", "Dildo\nCondom", "Buy", "Cancel");
Reply
#4

Bros please help I beg you
Reply
#5

What does your #DEFINE DIALOG_SEXSHOP look like? The rest of the statements look fine to me.
Reply
#6

Quote:
Originally Posted by mamorunl
Посмотреть сообщение
What does your #DEFINE DIALOG_SEXSHOP look like? The rest of the statements look fine to me.
Its just:

Код:
#define DIALOG_SEXSHOP
Here is the whole code

Код:
public OnPlayerEnterCheckpoint(playerid)
{

	new string[256];

	//if(PlayerInfo[playerid][pMission] <= MISSION_TYPE_CASINO_HOLDUP)
	//{

	new Houseid = PlayerInfo[playerid][pCheckpoint];


	switch (HouseInfo[Houseid][h_cptype])
	{
	
	
		case CP_TYPE_VEHICLE_SELL:
		{
			if (GetPlayerState(playerid) == PLAYER_STATE_DRIVER)
			{
				if (PlayerInfo[playerid][pTeam] != TEAM_POLIS)
				{

				new vehicleid = GetPlayerVehicleID(playerid);

				new Float:FullHealth,Health,Damage,MarketValue;
				GetVehicleHealth(vehicleid, FullHealth);
				format(string, sizeof(string), "%d",floatround(FullHealth)/10);
				Health = strval(string);
				Damage = 100 - Health;
				MarketValue = CarInfo[vehicleid][cValue] - Damage * 100;

				format(string, sizeof(string), "~w~PRESS THE ~y~2 ~w~KEY TO SELL YOUR~n~VEHICLE FOR ~w~$%i",MarketValue);
				GameTextForPlayer(playerid,string,5000,3);

				format(string, sizeof(string), "Press The SUB-MISSION KEY To Sell Your Vehicle. Current Damage: %d Percent. Value: $%i", Damage, MarketValue);
				SendClientMessage(playerid, COLOR_SERVER_HELP_MSG, string);
				}
			}
		}
	


		case CP_TYPE_ENTRY :
		{
			if (GetPlayerState(playerid) == PLAYER_STATE_ONFOOT)
			{
			PlayerInfo[playerid][pLastOutSideID] = Houseid;

			//format(string, sizeof(string), "ENTERED CHECKPOINT ID %d",PlayerInfo[playerid][pCheckpoint]);
			//SendClientMessage(playerid, COLOR_SERVER_HELP_MSG, string);

			if (PlayerInfo[playerid][pReturnWeapons] > 0)
			{
			for (new s=0; s<12; s++)
			{
			GivePlayerWeapon(playerid,PlayerInfo[playerid][pWeapon][s],PlayerInfo[playerid][pAmmo][s]);
			}
			PlayerInfo[playerid][pReturnWeapons] = 0;
			}
			
			


			switch (HouseInfo[Houseid][h_cpbustype])
			{

			//Welcome To {00AAFF}Woozie's Private Club{FFFFFF}.



			case BUS_TYPE_SEXSHOP:
			{
			SendClientMessage(playerid, COLOR_SERVER_HELP_MSG, "{FFFFFF}Welcome To The {00AAFF}Sex Shop{FFFFFF}!  Enter The {FF0000}Checkpoint {FFFFFF}to Purchase Special Items.");
			if (PlayerInfo[playerid][pTeam] != TEAM_POLIS)
			{
			SendClientMessage(playerid, COLOR_SERVER_HELP_MSG, "{FFFFFF}Type  {D6D631}/holdup  {FFFFFF}To Begin a Robbery.");
			}
			}

			case BUS_TYPE_DINER,BUS_TYPE_DONUT,BUS_TYPE_BURGERSHOT,BUS_TYPE_WELLSTACKED,BUS_TYPE_CLUCKINBELL:
			{
			SendClientMessage(playerid, COLOR_SERVER_HELP_MSG, "{FFFFFF}Welcome To The {00AAFF}Restaurant{FFFFFF}.");
			if (PlayerInfo[playerid][pTeam] != TEAM_POLIS)
			{
			SendClientMessage(playerid, COLOR_SERVER_HELP_MSG, "{FFFFFF}Type  {D6D631}/holdup  {FFFFFF}To Begin a Robbery.");
			}
			}

			case BUS_TYPE_DANCE_CLUB:
			{
			SendClientMessage(playerid, COLOR_SERVER_HELP_MSG, "{FFFFFF}Welcome To The {00AAFF}Dance Club{FFFFFF}.");
			if (PlayerInfo[playerid][pTeam] != TEAM_POLIS)
			{
			SendClientMessage(playerid, COLOR_SERVER_HELP_MSG, "{FFFFFF}Type  {D6D631}/holdup  {FFFFFF}To Begin a Robbery.");
			}
			}
			
			case BUS_TYPE_24_7:
			{
			SendClientMessage(playerid, COLOR_SERVER_HELP_MSG, "{FFFFFF}Welcome To {00AAFF}24/7 Conveniance Stores{FFFFFF}!  Enter The {FF0000}Checkpoint {FFFFFF}to Purchase Items.");
			if (PlayerInfo[playerid][pTeam] != TEAM_POLIS)
			{
			SendClientMessage(playerid, COLOR_SERVER_HELP_MSG, "{FFFFFF}Type  {D6D631}/holdup  {FFFFFF}To Begin a Robbery.");
			}
			}

			case BUS_TYPE_BAR:
			{
			format(string, sizeof(string), "{FFFFFF}Welcome To {00AAFF}%s{FFFFFF}. Don't Drink And Drive.",HouseInfo[Houseid][h_HouseIntName]);
			SendClientMessage(playerid, COLOR_SERVER_HELP_MSG, string);
			if (PlayerInfo[playerid][pTeam] != TEAM_POLIS)
			{
			SendClientMessage(playerid, COLOR_SERVER_HELP_MSG, "{FFFFFF}Type  {D6D631}/holdup  {FFFFFF}To Begin a Robbery.");
			}
			}

			case BUS_TYPE_AMMUNATION:
			{
			SendClientMessage(playerid, COLOR_SERVER_HELP_MSG, "{FFFFFF}Welcome To {00AAFF}Ammunation{FFFFFF}.");
			if (PlayerInfo[playerid][pTeam] != TEAM_POLIS && PlayerInfo[playerid][pVigilante] == 0)
			{
			SendClientMessage(playerid, COLOR_SERVER_HELP_MSG, "{FFFFFF}Type  {D6D631}/holdup  {FFFFFF}To Begin a Robbery.");
			}
			}
			
			case BUS_TYPE_BANK:
			{
			SendClientMessage(playerid, COLOR_SERVER_MAIN_MSG, "{FFFFFF}Welcome To The {00AAFF}Bank{FFFFFF}.  Enter The {FF0000}Checkpoint {FFFFFF}to Deposit or Withdraw Money.");
			}


			case BUS_TYPE_GYM:
			{
			format(string, sizeof(string), "{FFFFFF}Welcome To {00AAFF}%s{FFFFFF}. Enter The {FF0000}Checkpoint {FFFFFF}to Purchase Items.",HouseInfo[Houseid][h_HouseIntName]);
			SendClientMessage(playerid, COLOR_SERVER_HELP_MSG, string);
			if (PlayerInfo[playerid][pTeam] != TEAM_POLIS && PlayerInfo[playerid][pVigilante] == 0)
			{
			SendClientMessage(playerid, COLOR_SERVER_HELP_MSG, "{FFFFFF}Type  {D6D631}/holdup  {FFFFFF}To Begin a Robbery.");
			}
			}

			case BUS_TYPE_CITYHALL:
			{
			SendClientMessage(playerid, COLOR_SERVER_HELP_MSG, "{FFFFFF}Welcome To {00AAFF}City Hall{FFFFFF}.  Press The {D6D631}Look Behind Button {FFFFFF}Near The Bot To Buy Items.");
			for (new s=0; s<12; s++)
			{
			GetPlayerWeaponData(playerid, s, PlayerInfo[playerid][pWeapon][s],PlayerInfo[playerid][pAmmo][s]);
			}

			ResetPlayerWeapons(playerid);
			PlayerInfo[playerid][pReturnWeapons] = 1;
			}


			case BUS_TYPE_POLICE:
			{
			format(string, sizeof(string), "{FFFFFF}Welcome To The {00AAFF}%s.",HouseInfo[Houseid][h_HouseIntName]);
			SendClientMessage(playerid, COLOR_SERVER_HELP_MSG, string);
			SendClientMessage(playerid, COLOR_SERVER_HELP_MSG, "{FFFFFF}Press The {D6D631}Look Behind Button {FFFFFF}Near The Bot For Services.  Type  {D6D631}/bail (name/id)   {FFFFFF}to Pay A Players Bail.");
			//if (PlayerInfo[playerid][pTeam] != TEAM_POLIS)
			//{
			for (new s=0; s <12; s++)
			{
			GetPlayerWeaponData(playerid, s, PlayerInfo[playerid][pWeapon][s],PlayerInfo[playerid][pAmmo][s]);
			}
			ResetPlayerWeapons(playerid);
			PlayerInfo[playerid][pReturnWeapons] = 1;
			//}
			
			}




			}//End Of Switch
			
			//format(string, sizeof(string), "Checkpoint %d",Houseid);
			//SendClientMessage(playerid, COLOR_ADMIN, string);
			GetPlayerPos(playerid, PlayerInfo[playerid][pLastOutSideX],PlayerInfo[playerid][pLastOutSideY],PlayerInfo[playerid][pLastOutSideZ]);
			SetPlayerPosEx(playerid,HouseInfo[Houseid][h_entry_x],HouseInfo[Houseid][h_entry_y],HouseInfo[Houseid][h_entry_z],HouseInfo[Houseid][h_entry_a],HouseInfo[Houseid][h_entry_i],HouseInfo[Houseid][h_entry_w]);


			format(string, sizeof(string), "%s",HouseInfo[Houseid][h_HouseIntName]);
			strmid(PlayerInfo[playerid][pInteriorName], string, 0, strlen(string), 256);

			format(string, sizeof(string), "%s",HouseInfo[Houseid][h_HouseExtName]);
			strmid(PlayerInfo[playerid][pExteriorName], string, 0, strlen(string), 256);

			format(string, sizeof(string), "%s In %s",PlayerInfo[playerid][pInteriorName],PlayerInfo[playerid][pExteriorName]);
			strmid(PlayerInfo[playerid][pLocation], string, 0, strlen(string), 256);




			/*if (PlayerInfo[playerid][pGPS] == 1 && HouseInfo[Houseid][h_entry_i] && HouseInfo[Houseid][h_entry_w])
			{
			new startnode = NearestPlayerNode(playerid, 9999.0);
    		new end = NearestNodeFromPoint(PlayerInfo[playerid][pGPSX],PlayerInfo[playerid][pGPSY],PlayerInfo[playerid][pGPSZ], 9999.0);
   		 	CalculateServerPath(startnode, end, playerid);
			}*/


			}
		}


		case CP_TYPE_EXIT:
		{
			if (GetPlayerState(playerid) == PLAYER_STATE_ONFOOT)
			{
			new Exit = PlayerInfo[playerid][pLastOutSideID];

			SetPlayerPosEx(playerid,HouseInfo[Exit][h_exit_x],HouseInfo[Exit][h_exit_y],HouseInfo[Exit][h_exit_z],HouseInfo[Exit][h_exit_a],0,0);
			PlayerInfo[playerid][pLastOutSideID] = 0;

			//format(string, sizeof(string), "%s",HouseInfo[Houseid][h_HouseName]);
			//SendClientMessage(playerid, COLOR_SERVER_HELP_MSG, string);


			if (PlayerInfo[playerid][pReturnWeapons] > 0)
			{

			ResetPlayerWeapons(playerid);
			
			for (new s=0; s<12; s++)
			{
			GivePlayerWeapon(playerid,PlayerInfo[playerid][pWeapon][s],PlayerInfo[playerid][pAmmo][s]);
			}
			}
			PlayerInfo[playerid][pReturnWeapons] = 0;
			
			
    		/*if (PlayerInfo[playerid][pGPS] == 1)
	  		{
			PlayerInfo[playerid][pGPSX] = 0.0;
			PlayerInfo[playerid][pGPSY] = 0.0;
			PlayerInfo[playerid][pGPSZ] = 0.0;
			
			new startnode = NearestPlayerNode(playerid, 9999.0);
    		new end = NearestNodeFromPoint(PlayerInfo[playerid][pGPSX],PlayerInfo[playerid][pGPSY],PlayerInfo[playerid][pGPSZ], 9999.0);
   		 	CalculateServerPath(startnode, end, playerid);
			}*/
			
			
			
			}
		}

		case CP_TYPE_SERVICE:
		{
			/*if (GetPlayerState(playerid) == PLAYER_STATE_ONFOOT)
			{
			SendClientMessage(playerid, COLOR_ERROR, "Checkpoint Still Being Worked On Please Come Back Later.");
			}*/
			
			switch (HouseInfo[Houseid][h_cpbustype])
			{


			/*case BUS_TYPE_CASINO_ROB:
			{
			if (GetPlayerState(playerid) == PLAYER_STATE_ONFOOT)
			{
			if (PlayerInfo[playerid][pTeam] != TEAM_POLIS)
			{
			SendClientMessage(playerid, COLOR_ERROR, "Type /casinorob To Rob The Casino.");
			}
			}
			}*/

			/*case BUS_TYPE_DRUG_MISSION:
			{
			if (GetPlayerState(playerid) == PLAYER_STATE_ONFOOT)
			{
			if (PlayerInfo[playerid][pTeam] != TEAM_POLIS)
			{
			SendClientMessage(playerid, COLOR_ERROR, "Type /mission To Begin A Drug Mission.");
			}
			}
			}*/
			
			/*case BUS_TYPE_ROBBERY:
			{
			if (GetPlayerState(playerid) == PLAYER_STATE_ONFOOT)
			{
			if (PlayerInfo[playerid][pTeam] != TEAM_POLIS)
			{
			SendClientMessage(playerid, COLOR_ERROR, "Type /robbery To Begin A Robbery.");
			}
			}
			}*/
			
			
			case BUS_TYPE_POLICE:
			{
			if (GetPlayerState(playerid) == PLAYER_STATE_ONFOOT)
			{
			if (PlayerInfo[playerid][pTeam] != TEAM_POLIS)
			{
			
			if (PlayerInfo[playerid][pVigilante] == 0)
			{

			if (GetPlayerScore(playerid) > 10)
			{
			
			if (PlayerInfo[playerid][pWantedLevel] == 0)
			{
			PlayerInfo[playerid][pVigilante] = 1;
			SetPlayerColor(playerid, COLOR_TEAM_POLIS);
			
			GameTextForPlayer(playerid,"~b~ON DUTY AS POLICE OFFICER",5000,3);
			SendClientMessage(playerid, COLOR_SERVER_HELP_MSG, "You Have Been Hired As A Temporary Police Office. Re-Enter The Checkpoint To Go Off Duty.");

			format(string, sizeof(string), "Level: %d Rank: %s",PlayerInfo[playerid][pLevel],PoliceRanks[PlayerInfo[playerid][pRank]]);
			SendClientMessage(playerid, COLOR_TEAM_POLIS, string);
			
			ShowTextDrawMenu(playerid, TD_MENU_INFO, "~b~Police Officer", 10, 0);
    		ShowTextDrawMenuItems(playerid, 0, "Protect Innocent Civilians And~n~Keep The City Free Of Crime~n~ ~n~~y~/training ~w~- Police Training~n~~y~/ar [name/id] ~w~- Arrest A Suspect (~r~Orange~w~)~n~~y~/tk [name/id] ~w~- Issue A Ticket (~y~Yellow~w~)~n~~y~/fr ~w~- Ask A Player To Freeze~n~~y~/cm [msg] ~w~- Send A Message To All Cops~n~~y~/bk ~w~- Call For Backup", " ", " ",0);

			
			}else{
			SendClientMessage(playerid, COLOR_ERROR, "You Cannot Work For The Police Force When Your A Wanted Criminal.");
			}
			
			}else{
			SendClientMessage(playerid, COLOR_ERROR, "Your Score Is Not High Enough To Work For The Police.");
			}
			
			}else{
			
			GameTextForPlayer(playerid,"~b~OFF DUTY",5000,3);
			SendClientMessage(playerid, COLOR_SERVER_HELP_MSG, "You Are Now Off Duty. Thankyou For Having Served The Police Force.");

			format(string, sizeof(string), "SKILL: {0077FF}%s",SkillNames[PlayerInfo[playerid][pSkill]]);
			SendClientMessage(playerid,COLOR_SERVER_MAIN_MSG, string);

			//format(string, sizeof(string), "{FFFFFF}Welcome to {D6D631}Pink_Panther's {0077FF}Cops {FFFFFF}And {FF0000}Robbers{FFFFFF}- {00AAFF}%s {D6D631}Version %s",ServerInfo[sMapName],VERSION);

			PlayerInfo[playerid][pVigilante] = 0;
			ShowPlayerWantedStats(playerid);
			}

			}else{
			SendClientMessage(playerid, COLOR_ERROR, "You Are Already A Law Enforcement Agent.");
			}
			
			}
			}
			
			

			case BUS_TYPE_SEXSHOP:
			{
			if (GetPlayerState(playerid) == PLAYER_STATE_ONFOOT)
			{
  			ShowPlayerDialog(playerid, DIALOG_SEXSHOP, DIALOG_STYLE_LIST, "Menu", "Dildo\nCondom", "Buy", "Cancel");
			}
			}
              }
    }
    return 1;
}
Reply
#7

Help please
Reply
#8

pawn Код:
#define DIALOG_SEXSHOP 6521
Reply
#9

You have to define the dialog as a number which equals to the Dialog ID.

For example:
pawn Код:
#define DIALOG_SEXSHOP 555
555 is here the Dialog ID.
Reply
#10

Quote:
Originally Posted by Bible
Посмотреть сообщение
You have to define the dialog as a number which equals to the Dialog ID.

For example:
pawn Код:
#define DIALOG_SEXSHOP 555
555 is here the Dialog ID.
omg thank you guys !!
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)