public OnPlayerPickUpDynamicPickup(playerid, pickupid){ new houseid = GetHouseID(playerid); if(pickupid == HousePickup[houseid]){ if(Ugyanaz(hInfo[houseid][hTulaj],GetName(playerid))) { new S[128]; format(S,sizeof(S),\"Házszám:%d | Tulajdonos :%s\",hInfo[houseid][hID],hInfo[houseid][hTulaj]); new S2[128]; format(S2,sizeof(S2),\"Belép\\nElad(%.2f)\",(hInfo[houseid][hAr] * 77) / 100); ShowPlayerDialog(playerid,550,DIALOG_STYLE_LIST,S,S2,\"Rendben\",\"Mégsem\"); }}return 1;}stock GetHouseID(playerid){new result = -1;for(new i;i<MAX_HOUSES;i++){ if(IsPlayerInRangeOfPoint(playerid, 2.0, hInfo[hX], hInfo[hY], hInfo[hZ])){ result = i; break; }}return result;}
public OnPlayerPickUpPickup(playerid, pickupid){ new houseid = GetHouseID(playerid);if(pickupid == hInfo[houseid][hPickup]){ if(Ugyanaz(hInfo[houseid][hTulaj],GetName(playerid))) { new S[128]; format(S,sizeof(S),\"Házszám:%d | Tulajdonos :%s\",hInfo[houseid][hID],hInfo[houseid][hTulaj]); new S2[128]; format(S2,sizeof(S2),\"Belép\\nElad(%.2f)\",(hInfo[houseid][hAr] * 77) / 100); ShowPlayerDialog(playerid,550,DIALOG_STYLE_LIST,S,S2,\"Rendben\",\"Mégsem\"); }printf(\"%d\",houseid);} return 1;}
if(hInfo[hSell] == 0) { new S[128]; format(S,sizeof(S),\"{00FF00}ELADÓ HÁZ\\nHázszám: %d\\nÁr: %d Ft\\n((/hazvesz))\",hInfo[hID],hInfo[hAr]); HouseLabel = Create3DTextLabel(S, 0x13f034AA, hInfo[hX], hInfo[hY], hInfo[hZ], 20.0, 0, 1); HousePickup = CreatePickup(1273, 0, hInfo[hX], hInfo[hY], hInfo[hZ], -1); hInfo[hPickup] = HousePickup; } if(hInfo[hSell] == 1) { new S[128]; format(S,sizeof(S),\"{00FF00}Tulajdonos: %s\\nHázszám: %d\",hInfo[hTulaj], hInfo[hID]); HouseLabel = Create3DTextLabel(S, 0x13f034AA, hInfo[hX], hInfo[hY], hInfo[hZ], 20.0, 0, 1); HousePickup = CreatePickup(1272, 0, hInfo[hX], hInfo[hY], hInfo[hZ], -1); hInfo[hPickup] = HousePickup; }
hInfo[hPickup] = HousePickup;
CreatePickup(1272, 0, hInfo[hX], hInfo[hY], hInfo[hZ], -1);
CreateDynamicPickup
HazPickup[id] = CreateDynamicPickup(1273,1,hInfo[id][h_x],hInfo[id][h_y],hInfo[id][h_z],0);
public OnPlayerPickUpPickup(playerid, pickupid){for(new i = 0; i < hazszam; i++){if(pickupid == HazPickup){ ShowPlayerDialog(playerid,.....);}}return 1;}
public OnPlayerPickUpPickup(playerid, pickupid){ for(new i = 0; i < MAX_HOUSES; i++){ if(pickupid == hInfo[hPickup]) { if(Ugyanaz(hInfo[hTulaj],GetName(playerid))) { new S[128]; format(S,sizeof(S),\"Házszám:%d | Tulajdonos :%s\",hInfo[hID],hInfo[hTulaj]); new S2[128]; format(S2,sizeof(S2),\"Belép\\nElad(%.2f)\",(hInfo[hAr] * 77) / 100); ShowPlayerDialog(playerid,550,DIALOG_STYLE_LIST,S,S2,\"Rendben\",\"Mégsem\"); } else { new S[128]; format(S,sizeof(S),\"Házszám:%d | Tulajdonos :%s\",hInfo[hID],hInfo[hTulaj]); new S2[128]; format(S2,sizeof(S2),\"Belép\"); ShowPlayerDialog(playerid,550,DIALOG_STYLE_LIST,S,S2,\"Rendben\",\"Mégsem\"); } printf(\"%d\",hInfo[hID]);}} return 1;}
Kód: (pawn) [Kijelölés]