change checkpoint on the pickupe
#1

how to change the checkpoint on a standard pickup truck buying homes?




HouseInfo[i][hCP] = CreateDynamicCP(HouseInfo[i][hEnterX],HouseInfo[i][hEnterY],HouseInfo[i][hEnterZ],1.5,0,0,-1,25.0);
Reply
#2

Код:
HouseInfo[i][hCP] =  CreateDynamicPickup(1273, 1, HouseInfo[i][hEnterX],HouseInfo[i][hEnterY],HouseInfo[i][hEnterZ]);
Also you need to change its system according to OnPlayerPickupDynamicPickup
Reply
#3

Quote:
Originally Posted by Matz
Посмотреть сообщение
Код:
HouseInfo[i][hCP] =  CreateDynamicPickup(1273, 1, HouseInfo[i][hEnterX],HouseInfo[i][hEnterY],HouseInfo[i][hEnterZ]);
Also you need to change its system according to OnPlayerPickupDynamicPickup
Код HTML:
public OnPlayerPickUpDynamicPickup(playerid, pickupid)
{
	if(GetPlayerState(playerid) != PLAYER_STATE_ONFOOT) return 1;

	if(GetPVarInt(playerid,"House") != -1)
	{
	    new houseid = GetPVarInt(playerid,"House");
		if(checkpointid == HouseInfo[houseid][hCP]) return ShowPlayerDialog(playerid,DIALOG_MY_HOUSE,DIALOG_STYLE_MSGBOX,"Äîì","{ffffff}Ýòî âàø äîì\nÂû õîòèòå çàéòè â íåãî?","Çàéòè","Çàêðûòü");
		else if(checkpointid == HouseInfo[houseid][hCPMenu]) return ShowPlayerHouseMenu(playerid,houseid);
	}
	for(new i; i < CountHouses; i++)
		if(checkpointid == HouseInfo[i][hCP])
		{
     		new str[109];
		    SetPVarInt(playerid,"CPHouse",i);
			if(!strcmp(HouseInfo[i][hOwner],"No",true))
			{
				format(str,101,"{00ff00}Ýòîò äîì ïðîäàåòñÿ\n{ffff00}Öåíà: {ff0000}$ %i\n{ffff00}Âû æåëàåòå êóïèòü ýòîò äîì?",HouseInfo[i][hCost]);
		        ShowPlayerDialog(playerid,DIALOG_HOUSE_BUY,DIALOG_STYLE_MSGBOX,"..:: Ïîêóïêà äîìà ::..",str,"Êóïèòü","Îòìåíà");
			}
			else
				if(HouseInfo[i][hLocked])
			    {
      				format(str,106,"{ffff00}Âëàäåëåö: {ff0000}%s\n{ffffff}Ñòàòóñ: {00ff00}Îòêðûò\nÂû æåëàåòå çàéòè â äîì?",HouseInfo[i][hOwner]);
					ShowPlayerDialog(playerid,DIALOG_HOUSE_OPEN,DIALOG_STYLE_MSGBOX,"..:: Âõîä â äîì ::..",str,"Âîéòè","Çàêðûòü");
				}
				else
				{
				    format(str,sizeof(str),"{ffff00}Âëàäåëåö: {ff0000}%s\n{ffff00}Ñòàòóñ: {ff0000}Çàêðûò\nÂû íå ìîæåòå â íåãî âîéòè",HouseInfo[i][hOwner]);
					ShowPlayerDialog(playerid,DIALOG_FREE,DIALOG_STYLE_MSGBOX,"..:: Âõîä â äîì ::..",str,"Çàêðûòü","");
					SetPVarInt(playerid,"CPHouse",-1);
				}
			return 1;
		}
		else if(checkpointid == HouseInfo[i][hCPOut]) return RemovePlayerHouse(playerid);

	for(new i; i < sizeof Ammo; i++)
	    if(checkpointid == Ammo[i])
		{
		    SetPVarInt(playerid,"PDialog",1);
			ShowDialog(playerid,DIALOG_WEAPONS);
			return 1;
		}
how can you create the action on the pickups, and then turn on all pickups
Reply


Forum Jump:


Users browsing this thread: 3 Guest(s)