14.12.2011, 12:49
Hey!
How to make system, that if you pick up pickup and press Yes on dialog, the person in house will hear that you are knocking?
I tryed:
Errors:
Code under OnPlayerPickUpPickup:
How to make system, that if you pick up pickup and press Yes on dialog, the person in house will hear that you are knocking?
I tryed:
Код:
if(dialogid == 37)
{
if(response)
{
ShadInfoBoxForPlayer(playerid, "You knocked at the door...");
new inter = houseDB[pickupid][setting]; //This line
for(new i=0;i<MAX_PLAYERS;i++)
{
if(IsPlayerConnected(i))
{
if(GetPlayerVirtualWorld(i)==pickupid) //And this line
{
if(GetPlayerInterior(i)==houseSETTINGS[inter][interior])
{
SendClientMessage(i,GREEN,"Someone is knocking at door");
}
}
}
}
}
return 1;
}
Код:
D:\Siuntiniai\GRP4(1)\GRP4\gamemodes\new.pwn(4536) : error 017: undefined symbol "pickupid" D:\Siuntiniai\GRP4(1)\GRP4\gamemodes\new.pwn(4541) : error 017: undefined symbol "pickupid"
Код:
if(pickupid > pickups[0][namai]-1 && pickupid < pickups[1][namai]+1)
{
new name[MAX_PLAYER_NAME];
GetPlayerName(playerid,name,sizeof(name));
if(!strcmp(name,houseDB[pickupid][owner_name],true))
{
SendClientMessage(playerid,COLOR,"You've came to your house!");
new inter = houseDB[pickupid][setting];
SetPlayerInterior(playerid,houseSETTINGS[inter][interior]);
SetPlayerPos(playerid,houseSETTINGS[inter][enter_pos][0],houseSETTINGS[inter][enter_pos][1],houseSETTINGS[inter][enter_pos][2]);
SetPlayerVirtualWorld(playerid,pickupid);
return 1;
}
new msg[128];
new houseid = playerDB[playerid][rid][3];
format(msg,sizeof(msg),"Owner: %s.\nNumber: %i\nKnock to the door?",houseDB[pickupid][owner_name],houseid);
ShowPlayerDialog(playerid, 37, DIALOG_STYLE_MSGBOX,"Info",msg,"Yes","No");
return 1;
}

